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 365 and Office | OneDrive | For business | Windows
Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. CarlZhao-MSFT 46,376 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.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.