OneDrive picker support any account and tenant

Hilaire Djani 0 Reputation points
2023-01-26T19:17:04.5466667+00:00

Hello,

I am building an app to allow users select files from their OneDrive accounts using the OneDrive file picker. I have configured my Azure app registration to allow any tenant and personal accounts, and file read permissions.
However, attempting to open the picker always fails with the error "code":"InvalidAuthenticationToken","message":"Access token is empty."
My msal configs are as follows

 auth: {
        authority: "https://login.microsoftonline.com/common",
        clientId: "4e227f5d-a682-4da4-a48d-6812fabfd204",
        redirectUri: "http://localhost:3000"
    }

My permissions scope as follows

authParams = { scopes: [`${combine(command.resource, ".default")}`] };

The problem is, it is not clear what to put as baseURL when requesting access tokens. The tutorial here and sample codes here

are not exactly clear about what to put as baseURL

Please could you advice on what configuration could be missing or maybe on some more elaborate sample code/tutorials.Looking forward to your reply and brilliant work with this SDK.

Thank you

Screenshots attached
Screenshot by Dropbox Capture

Screenshot by Dropbox Capture

Screenshot by Dropbox Capture

OneDrive
OneDrive
A Microsoft file hosting and synchronization service.
890 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Emily Hua-MSFT 27,551 Reputation points
    2023-01-27T05:35:10.01+00:00

    Hi @Hilaire Djani

    As your issue is related to OneDrive developers which is not supported on Q&A forum, to help you better, I would suggest yuo post a new thread on following forum.

    Microsoft Tech Community --- OneDrive Developer

    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.


    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 comments No comments