Open gaetanDev7 opened 2 years ago
No, the picker does not currently call the graph APIs. This is great feedback we will share with the feature team, but there is currently not a timeline to switch the backend to Microsoft Graph.
Thank you @patrick-rodgers for this information. Hope to be able to have the picker soon connected to Microsoft Graph.
Very much hoping this can be implemented!
Same here... really difficult to work with this picker when it effectively means we need 3 different auth tokens for the solution to work....
I've recently been investigating integrating Microsoft file-picking into our app, and ultimately concluded that v7.2 is a clearer path forward for us.
As a consumer, I don't want to think or understand the nuances of Microsoft's multiple file-management services - the moment I have to start worrying about the differences between one-drive or sharepoint configurations, the surface area of what I need to test as an app developer has doubled and my confidence that future changes won't subtly break behaviour is halved.
Which is a bit of shame v8 doesn't do this for us, hopefully MS Graph support is roadmapped soon 🤞
I was forced to use v7.2 API since it is required that we must use MS Graph. Adding +1 here that it is added to the roadmap for v8.
Hey team,
It looks like we have the same problem.
We were using the File picker SDK and we tried to use the access token we already have for the application.
Technically speaking the load is done as it:
// Init the library with an empty auth
new msal.PublicClientApplication({ auth: { clientId: '...'}})
...
// Then generate the form with the local token
win = window.open('', 'Picker', 'width=800,height=600') as WindowProxy;
const authToken = await getToken();
const queryString = new URLSearchParams({
filePicker: JSON.stringify({...}),
});
const url = combine(baseUrl, `_layouts/15/FilePicker.aspx?${queryString}`);
const form = win.document.createElement('form');
form.setAttribute('action', url);
form.setAttribute('method', 'POST');
win.document.body.append(form);
const input = win.document.createElement('input');
input.setAttribute('type', 'hidden');
input.setAttribute('name', 'access_token');
input.setAttribute('value', authToken);
form.appendChild(input);
form.submit();
using it, we have this error:
"status": 401,
"authenticate": "Bearer realm=\"d49cbc78-6d92-451d-84a3-b04cd87d201f\",client_id=\"00000003-0000-0ff1-ce00-000000000000\",trusted_issuers=\"00000001-0000-0000-c000-000000000000@*,D3776938-3DBA-481F-A652-4BEDFCAB7CD8@*,https://sts.windows.net/*/,https://login.microsoftonline.com/*/v2.0,00000003-0000-0ff1-ce00-000000000000@90140122-8516-11e1-8eff-49304924019b\",authorization_uri=\"https://login.microsoftonline.com/common/oauth2/authorize\"",
"code": "3000003,invalid_client",
"message": "Exception of type 'Microsoft.IdentityModel.Tokens.AudienceUriValidationFailedException' was thrown.",
"codes": {
"order": [
"x-ms-diagnostics"
],
"map": {
"x-ms-diagnostics": {
"source": "x-ms-diagnostics",
"code": "3000003,invalid_client",
"message": "Invalid audience Uri 'https://graph.microsoft.com/'.",
"isDisplayable": true
}
}
},
...
Here is the token information used:
{
"aud": "https://graph.microsoft.com",
"iss": "https://sts.windows.net/d49cbc78-6d92-451d-84a3-b04cd87d201f/"
...
"appid": "4af4d3f2-******",
"scp": "... Files.ReadWrite.All ... Sites.Read.All ...",
}
At first sight it seems the audience https://graph.microsoft.com/, can not be used. If so, how can we use the librairie to access the graph API ? Has there been any progress on this ? 🙏
Is there any update on this? Is this being considered at all?
@Tjerkdb @armasson We have it logged on our end that we'd like to support Graph. However, now that we no longer have a javascript wrapper like v7.2 did, there's new security concerns for switching to Graph. We hope to work with the auth team to get this supported, but in the meantime, v7.2 might be best for users reliant on Graph.
Hello,
I've implemented a picker to access OneDrive/ Sharepoint using V 8.0 SDK. Our platform is heavily dependent on Microsoft Graph to perform access for all our customers.
Here is the implementation example:
You will find below a screenshot of the error message :
So basically, in my MS Graph token my ‘audience’ is as follows:
"aud": "https://graph.microsoft.com/"
Is there currently a way to make the picker work with MS Graph ? Please advise.
Thanks in advance for your Help.