SPFX 1.6 msGraphClient error on SharePoint app Android
Category
- [ ] Question
- [ ] Typo
- [X] Bug
- [ ] Additional article idea
Expected or Desired Behavior
I created a SharePoint Framework 1.6 webpart which uses the MSGraphClient. On all browsers (tested with IE11, Edge, Chrome on laptop. Tested with Chrome, Edge, Samsung browser on cell phone ) this is working as expected: information from Graph is received.
Observed Behavior
However, when I open the site with the webpart in the SharePoint mobile app (Version 3.0.0 on Android 7.0) the webpart receives an error:
"AADSTS50058: A silent sign-in request was sent but no user is signed in. The cookies used to represent the user's session were not sent in the request to Azure AD. This can happen if the user is using Internet Explorer or Edge, and the web app sending the silent sign-in request is in different IE security zone than the Azure AD endpoint (login.microsoft.com). "
Steps to Reproduce
this.props.context.msGraphClientFactory.getClient().then((graphClient:MSGraphClient) => {
//Office 365 and security groups
graphClient
.api("me/memberOf")
.version("v1.0")
.get()
.then((graphgroups: any) => {
alert("groups response received");
}, (error: any) => {
alert(error.message);
});
});
I think you can refer to this document AADSTS50058: A silent sign-in request was sent but no user is signed in
I am seeing the same issue, when adding a SharePoint page in the Microsoft Teams Client as a tab. But it is working when running MS Teams in the browser ;)
Does this happen just with 1.6 or is this a general problem?
Many of our user stories include accessing something Graph-based during an early morning subway ride - of course with the SharePoint App...
Does this happen just with 1.6 or is this a general problem?
Many of our user stories include accessing something Graph-based during an early morning subway ride - of course with the SharePoint App...
msGraphClient has become General Available in spfx 1.6 . You are probably using a different method for connecting to Graph
The way I see it this happens when using native applications and not the browser. We do not have any settings there to allow for cross-domain cookies, trusted sites or things like that. Is this working for anyone or is this a general issue using SPFx 1.6 and graph/adal? Because the old GraphHttpClient did work just fine in this scenario.
Okay i just realized....if I enable and disable the MS Teams developer preview, at least for MS Teams client it is working now. It must have been some caching issue. Still I cannot get the SP Mobile App to work though....
I am also seeing this in the SP app...
+1
We have the same issue.
Okay it looks like everyone has this issue in the SharePoint mobile app. So adding @VesaJuvonen and @patmill who should be able to forward this to the right people/channel...
Yes - known issue. We are working on it. Things work quite nicely in the browser, but client apps are problematic.
Hmmm... just got this issue on Chrome. This browser and specific page were working fine for weeks - now all of the sudden I get this error.
Any idea what could be the issue?
Regular team site, modern web part page, SPFx 1.6, Chrome latest build, Windows 10
Found a workaround for the browser, but it won't work for everyone: Visited https://developer.microsoft.com/en-us/graph/graph-explorer and logged in. Once I did that - my pages started to work again. Would be great to still have an answer for customers who will experience this issue...
This is a known issue that we currently have across all rich clients. Our graph calls require that the cookie from the browser which contains the access token already exists. We are working on a generic solution that will work across all non browser clients (teams/android/ios etc).
@patmill , @VesaJuvonen is there any news on when this will be fixed? We have several customers that are using the SharePoint Mobile App and that get errors all over the place.
Yes, this is really annoying
The same problem is critical! @patmill , @VesaJuvonen is there any news on when this will be fixed? Is this problem fixed in SPFx 1.7?
Any updates on the above issue. We are facing this issue for a while and client needs solution for it. It works well on all the browsers but fails in Sharepoint mobile app(android/iOS).
I would also appreciate a solution to this problem. We developed a business application as a SharePoint Framework web part, but it doesn't work in the SharePoint android mobile app. In our case we are accessing a back-end API using the aadHttpClient, but I guess the same authentication mechanism is failing in both cases.
We are also facing this issue in several spfx:1.7 webparts that use msGraph client. It works on all browsers but not in the SharePoint App! Any news on this?