-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scope Definition for V8 version #6
Comments
Correct, the v8 picker currently uses non-graph APIs and requires the scope you have indicated. For your second question, are those accounts using OneDrive consumer? If so that should be: scope: OneDrive.ReadWrite |
In our case, Consumer Accounts (gmail.com etc) can connect their OneDrive account and share files with the Picker. From V7.2 version it is observed that for Also URL redirection decision was taken in the OneDrive72.js which is JavaScript SDK given for the 7.2 version For V8 version, explicit need of baseURL is there while launching a picker. We got error screen “This item might not exist or no longer available” For Consumer account we do not have a particular tenant to host the picker and as per 7.2 version https://onedrive.live.com/ is no longer working as a baseURL. |
In Our App, Picker is not specific for our organisation For the Business User Login, Picker will be hosted on their particular Org Location based on the login. Which is not in the App's control. For Non-Business Users, it could be a generic (for .gmail.com it could be onedrive.live.com) As different users can add different type of accounts, depending on the login, baseURL to launch the picker needs to be decided. We need a way to determine what should be the baseURL for each logged in user Business/Non-Business. |
The baseUrl value should be By design the picker requires you to know prior to launching into what "tenant" it is being loaded. That is the baseUrl value you refer to. You would not be able to identify consumer/enterprise accounts from the token as the token is generated based on the audience you supply, unless I am misunderstanding the question. In your application it seems like you have a single account on your side where users can add one or more OneDrive/SharePoint accounts as sources? If that is the case you would need to store some tenant information for each to allow you to authenticate them and load the picker for the correct source location. There isn't a way to say "for this random account give me access to all the tenants/OneDrives to which they have access". Before you even load the picker you'd need to know where they are targeting to correctly resolve the tokens. But again, perhaps I am missing something. |
We tried "https://onedrive.live.com/picker" as a base URL for the Consumer Account. We are receiving Error for the Scope as mentioned. We tried all possible combinations for the Scope 2.Scope : OneDrive.ReadWrite For Consumer Accounts we were unable to get the Sample Code working. Is there an example of using OneDrive Picker v8 with personal Microsoft accounts? All the examples/Samples I can see use business accounts only. |
Just added a new basic sample showing how to use the picker with consumer (personal accounts). |
@patrick-rodgers |
@rahul-vyavahare - moved your comment to a new issue. This issue is resolved so closing it as answered. Thanks! |
Hello,
I am trying to implement a picker to access OneDrive/Sharepoint using V8.0 for my organisation.
We have a working setup for V7.2 and planning to migrate on V8 version.
Scope (V7.2) : profile openid https://graph.microsoft.com/User.Read https://graph.microsoft.com/Files.Read.All
Scope (V8) : https://xxxxxxxxx-my.sharepoint.com/.default (Only Scope that worked)
It seems the scopes my organisation was using for V7.2 are no longer working for V8 version.
V8 version is only working with baseUrl/.default
If we try with same scope that we defined for V7.2 version, we receive below error
{"error_description":"Exception of type 'Microsoft.IdentityModel.Tokens.AudienceUriValidationFailedException' was thrown."}
Is there any way that V8 version will work with below scope?
"profile openid https://graph.microsoft.com/User.Read https://graph.microsoft.com/Files.Read.All"
Question 2 :
What should be the baseURL for personal user accounts. e.g xxx-yyy@gmail.com lmn.pqr@gmail.com ?
The text was updated successfully, but these errors were encountered: