Yeah, so the layer is owned by myself and I am admin on the AGOL organisation in question, so there shouldn’t be any authentication issue, in actual fact if I try to create a sdf in a notebook in AGOL itself, it works perfectly using the same item and code, so it appears to be the OAuth2 authentication.
Once I’ve authenticated using my client ID and have a token, I use the following:
item = gis.content.get("itemid")
featLayer = item.layers[0]
sdf = pd.DataFrame.spatial.from_layer(featlayer)