Authenticate OneDrive API with client-credentials-flow

NK, SatishKumar 71 Reputation points
2022-07-18T08:13:59.56+00:00

We have a requirement to expose an API which can talk to OneDrive storage to download the files which is in shared directory. Can i have OAuth Client Credential flow using Azure AD ?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,709 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
2,685 questions
OneDrive Management
OneDrive Management
OneDrive: A Microsoft file hosting and synchronization service.Management: The act or process of organizing, handling, directing or controlling something.
1,137 questions
{count} vote

Accepted answer
  1. CarlZhao-MSFT 37,296 Reputation points
    2022-07-18T10:26:45.073+00:00

    Hi @NK, SatishKumar

    You can of course use the client credentials flow to get an access token for your api app. Before that, make sure you have added the client app to the api app. If you are using appRole then make sure you have granted the application permissions for the api app to your client app.

    221805-yx8k5.png


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 additional answers

Sort by: Most helpful