-
Notifications
You must be signed in to change notification settings - Fork 61
Description
👋 Team,
We have an existing OneDrive integration where we store refresh_token and access_token in the BE. Using this refresh_token, we acquire a new SharePoint access_token (scope: "https://".($webURL)."/.default openid profile") that is compatible with the v8 OneDrive File Picker. Currently this works for OneDrive business account users.
However, we have certain OneDrive business account customers who are onboarded via the client_credentials OAuth flow (Domain-wide-auth), where the MS token API (/oauth2/v2.0/token) does not provide a refresh_token. We attempted to obtain a SharePoint access_token using the client_credentials flow, but the v8 File Picker APIs (the /me endpoint) return the error Unsupported app-only token or Unauthorised and doesn’t work.
How can we make the v8 OneDrive File Picker work with tokens acquired through the client_credentials flow? If that’s not feasible, what alternative solutions can be implemented?
Thanks in advance for your Help!