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

MSGraphClient - IE and EDGE issue

Open aslanovsergey opened this issue 8 years ago • 21 comments

It doesn't work from IE and Edge Browsers. Graph Client request is stuck and leave Authentication window open. I tried turn off Pop-Up Blocker and added site to trusted.


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

aslanovsergey avatar Mar 29 '18 07:03 aslanovsergey

Same problem.

It works in other browser but not in their own browsers... a little sad tbh. Is there any expected date / estimation when this will be addressed and fixed?


A few more details.

This is the code I'm currently using, note that this is a very small standard project, created via yo using SPFx version 1.4.1.

package-solution.json:

....
    "webApiPermissionRequests": [
      {
        "resource": "Microsoft Graph",
        "scope": "Contacts.Read"
      }
    ]
....

File PopUpWebPart.ts:

import {MSGraphClient} from "@microsoft/sp-client-preview";
//....

export default class PopUpWebPart extends BaseClientSideWebPart<IPopUpWebPartProps> {

  public render(): void {

  const client: MSGraphClient = this.context.serviceScope.consume(MSGraphClient.serviceKey);

    client
      .api("/me/contacts")
      .get()
      .then(result => {
        console.log(result);
      })
      .catch(error => {
        throw new Error(error.statusCode + ": " + error.message);
      });

    const element: React.ReactElement<IPopUpProps > = React.createElement(
      PopUp,
      {
        description: this.properties.description
      }
    );

    ReactDom.render(element, this.domElement);
  }
//...
}

This is how it looks in Internet Explorer 11 if you try to use the MSGraphClient: image

No errors on console.

This is how it looks in Edge, there it even opens a new tab, which then also does nothing and there are also no errors on the console: image

Nasicus avatar Apr 09 '18 12:04 Nasicus

@VesaJuvonen is there any news / updates on this? We really need this, because our new solution depends on this new authentication, but if the IE issues are not resolved, we are force to go back and use the deprecated clients again. Is there a roadmap and/or release ETA anywhere concerning this issues? I also read in the linked issue that you plan (or already did) to get rid of the popups? Because it's highly user unfriendly and even practically unusable un mobile.

Related: #1656

Nasicus avatar Apr 17 '18 13:04 Nasicus

Hi All,

MSGraphClient still not working in edge and IE.Its working fine in chrome. Is this issue resolved ? And Do I need to add any specific code to run MSGraphClient in IE?

Please Update us for this issue.

VidhiBartariya avatar Jul 16 '18 10:07 VidhiBartariya

@vbartari I don't see WebApiPermission in the new Admin Center. This is what I see on my SharePoint Admin Center:

image

and I get error message on App Catalog:

https://user-images.githubusercontent.com/6519992/42849718-58af2666-89d9-11e8-8522-8c2e80d4506f.PNG

I followed this tutorial: https://docs.microsoft.com/en-us/sharepoint/dev/spfx/use-aad-tutorial

Could you please let me know if you did something different from that to make it work in Chrome? Thanks!

lipalath-ms avatar Jul 17 '18 23:07 lipalath-ms

Hi @licypal, you first need to set your tenant in first release mode or nowedays named Targeted mode. When you do that you will have the WebApiPermissions list available and your package will be uploaded correctly. More information how to set this mode and what are the consequences can be found here: https://support.office.com/en-us/article/set-up-the-standard-or-targeted-release-options-in-office-365-3b3adfa4-1777-4ff0-b606-fb8732101f47

SanderSiep avatar Jul 18 '18 10:07 SanderSiep

Hi @vbartari, in Edge the Graph popup shows me an inlog dialog while in Chome this is just going automatically. In IE it seems to work correctly.

SanderSiep avatar Jul 18 '18 11:07 SanderSiep

Any update on getting this to work? Not seeing the log in screen just no results are being returned but everything works in other browsers as expected.

enail131 avatar Nov 07 '18 17:11 enail131

Any updates on this?

kasgit avatar Nov 19 '18 11:11 kasgit

As far as I can tell and according to my experience this has been fixed long ago. I don't know what version you guys are using but for us this works for quite a time now (even before SPFx 1.6 release).

Nasicus avatar Nov 19 '18 14:11 Nasicus

Hi, it works for all browsers except IE 11 for us. We are using SPFx 1.6.

kasgit avatar Nov 19 '18 21:11 kasgit

In order for me to fix this I had to add login.microsoftonline.com to the trusted sites list within the Internet Explorer options.

The MSGraphClient has an error parameter. Log or alert the error to get a better idea of what your specific error is.

enail131 avatar Nov 19 '18 21:11 enail131

Hi, we have added both login.microsoftonline.com & ourcompany.sharepoint.com to Trusted sites security zone. Below is the error message we are getting. Problem is we have multiple O365 tenants in our company and users who still use IE11 will face this issue.

AADSTS70002: Error validating credentials. AADSTS16000: Request is ambiguous: multiple user identities are available for the current request.

kasgit avatar Nov 19 '18 21:11 kasgit

Sounds like you’re logged in to multiple office 365 accounts. Try logging out of all accounts and logging back in to just one of them. A new session might help as well. Clearing cache and all cookies/tokens might not be a bad step either.

enail131 avatar Nov 19 '18 21:11 enail131

Thanks for you response @enail131 . As mentioned in my edit above, we have multiple O365 tenants and there are still users using IE11. Forgot to mention, it works in IE11 inprivate. But we can't ask all the users to use InPrivate mode. The issue I have realised is it is not sending login_hint with authorize request.

kasgit avatar Nov 19 '18 22:11 kasgit

Reviewing old comments...

Are you still experiencing this issue? It's been a while since this was posted and many updates have been applied to SPO + released for SPFx. If it is still present, please provide additional detail such as specific error messages. TIA

andrewconnell avatar Jun 19 '19 22:06 andrewconnell

Hi Andrew,

We haven't got a chance to upgrade to SPFX 1.8. The specific issue has been fixed in 1.8?

kasgit avatar Jun 20 '19 03:06 kasgit

@kasgit I'm aware of one fix that rolled out in the system that dealt with the issue of multiple identities on the page, but can't recall exactly what it was. It wasn't in the SPFx codebase, rather a SPO code rollout.

This issue is about Edge & IE11 not working... if there's a different issue, you should open another issue and provide details.

andrewconnell avatar Jun 20 '19 09:06 andrewconnell

@andrewconnell Thank you for your response. We used to get the same error(in IE). And realised that there was a fix deployed at SPO level(spfxsinglesignon.aspx). But now we are getting a popup error message(screen grab below). Hence, was wondering, whether upgrading spfx from version 1.6 to 1.8 would fix this issue. Nevertheless, will try to upgrade sometime today and will let you know.

image

image

kasgit avatar Jun 20 '19 22:06 kasgit

This issue has been automatically marked as stale because it has marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within next 7 days of this comment. Thank you for your contributions to SharePoint Developer activities.

msft-github-bot avatar Jun 27 '19 23:06 msft-github-bot

Closing issue due no response from original author. If this issue is still occurring, please open a new issue with additional details. Notice that if you have included another related issue as additional comment on this, please open that also as separate issue, so that we can track it independently.

msft-github-bot avatar Jul 05 '19 00:07 msft-github-bot