"Bring your own token" capability? #583
Replies: 2 comments
-
I don't know if this is possible.. do you have any documentation pages to look into this? |
Beta Was this translation helpful? Give feedback.
-
Thanks for responding, no worries if there's no bandwidth. I don't have any documentation on this outside that provided by Microsoft for the REST query itself to MS Graph API with the token in the header. My specific use case for posting is as follows. I have a browserless app where I've been using MSAL to authenticate a user to a single tenant (PublicClient) application using the device code flow and token cache. I used this tutorial to set the auth flow up. After using the token against the MS Graph API, it seemed like a headache to parse all the json in order to transform a SharePoint list into a pandas dataframe - especially when some of the more complex content types had the values I wanted in my dataframe nested further in the json heirarchy. I got it working, but after discovering this project, I thought it might be better to see if the O365 library can meet my needs on the parsing end if I could work out a device code flow (or more universally a "bring your own token" feature, as I've already worked out the flow using MSAL outside this library). After looking through the connection class, it doesn't look like this project uses MSAL for authentication, but rather implements OAuth directly using requests. Even if it were possible to use the O365 library just with a token, I'm not sure how well MSAL would play with the O365 library when it came to things like token expiration. |
Beta Was this translation helpful? Give feedback.
-
Hopefully I'm posting this in the right place. Wanted to know from the community if it might be helpful to have a BYOT (Bring your own token) addition to the library? This might allow for some of those less common auth flows that aren't readily available in the O365 library, but that users may want to build on their own with MSAL and just use O365 for it's GraphAPI parsing capabilities by passing a token?
Beta Was this translation helpful? Give feedback.
All reactions