Share via

One Drive File Picker v8

Harsha Vardhini 30 Reputation points
2023-10-11T14:32:10.7766667+00:00

Is there a way to configure my OneDrive File Picker to work with both my business and personal accounts using a common configuration? Currently, I have to use a different configuration for each account, which is inconvenient. Furthermore, even if I am logged into my personal account via file picker, the files are not loaded unless I am logged in to that account in another browser tab.

  const baseUrl = 'https://{}-my.sharepoint.com';
    const msalParams = {
        auth: {
            clientId: '{clientId}',
            authority: 'https://login.microsoftonline.com/{tenant-id}',
            redirectUri: redirectUrl
        },
    };

  const baseUrl = 'https://onedrive.live.com/picker';
    const msalParams = {
        auth: {
            clientId: '{clientId}',
            authority: 'https://login.microsoftonline.com/common',
            redirectUri: redirectUrl
        },
    };


I would appreciate if anyone could help me out on this

Microsoft 365 and Office | Development | Other
Microsoft 365 and Office | OneDrive | For business | Windows
0 comments No comments
{count} votes

Your answer

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