sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

SPFX 1.6 msGraphClient error on SharePoint app Android

Open RicoNL opened this issue 8 years ago • 63 comments

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);
    });
});

RicoNL avatar Sep 11 '18 21:09 RicoNL

I think you can refer to this document AADSTS50058: A silent sign-in request was sent but no user is signed in

KingKangMSFT avatar Sep 12 '18 06:09 KingKangMSFT

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 ;)

OliverZeiser avatar Sep 13 '18 10:09 OliverZeiser

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...

BigEaseGueldi avatar Sep 14 '18 07:09 BigEaseGueldi

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

RicoNL avatar Sep 17 '18 08:09 RicoNL

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.

OliverZeiser avatar Sep 18 '18 14:09 OliverZeiser

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....

OliverZeiser avatar Sep 18 '18 14:09 OliverZeiser

I am also seeing this in the SP app...

JHolah avatar Sep 19 '18 14:09 JHolah

+1

BigEaseGueldi avatar Sep 28 '18 22:09 BigEaseGueldi

We have the same issue.

PzYon avatar Oct 01 '18 12:10 PzYon

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...

OliverZeiser avatar Oct 01 '18 13:10 OliverZeiser

Yes - known issue. We are working on it. Things work quite nicely in the browser, but client apps are problematic.

patmill avatar Oct 01 '18 17:10 patmill

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

shaipetel avatar Oct 24 '18 00:10 shaipetel

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...

shaipetel avatar Oct 24 '18 00:10 shaipetel

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).

GrahamMcMynn avatar Oct 25 '18 18:10 GrahamMcMynn

@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.

PzYon avatar Nov 30 '18 08:11 PzYon

Yes, this is really annoying

harshdamaniahd avatar Nov 30 '18 14:11 harshdamaniahd

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?

Rasstryga avatar Nov 30 '18 15:11 Rasstryga

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).

MaheshakaMudli avatar Dec 03 '18 07:12 MaheshakaMudli

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.

lucmoco avatar Dec 04 '18 10:12 lucmoco

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?

luis-ribeiro avatar Dec 04 '18 18:12 luis-ribeiro