Must be authenticated to use '/drive' syntax

Fazlyn 0 Reputation points
2024-04-20T08:50:10.2266667+00:00

I have registered a 'Personal Microsoft accounts only' application via azure portal and given permission to 'File.ReadWriteAll' and set the relevant user as the owner.

By using the endpoint, https://login.microsoftonline.com/consumers/oauth2/v2.0/token i have retreived the access token, please note here, i have set below parameters,

But, when i try https://graph.microsoft.com/v1.0/drives to view the drive items, it returns the error, 'Must be authenticated to use '/drive' syntax'

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,913 questions
OneDrive
OneDrive
A Microsoft file hosting and synchronization service.
879 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. CarlZhao-MSFT 38,196 Reputation points
    2024-04-22T02:50:07.71+00:00

    Hi @Fazlyn

    For personal accounts, you should use delegated permissions and auth code flow to request the token, because you must authenticate the personal account itself and not the application.

    Hope this helps.

    If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.

    1 person found this answer helpful.