Skip to content

Getting the picker v8.0 work with client_credentials OAuth flow. #82

@abhishek199-dhn

Description

@abhishek199-dhn

👋 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!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions