Skip to content
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

When using the MSGraphClient you get the 'AADSTS50011: The reply url specified in the request does not match the reply urls configured for the application: 'c58637bb-e2e1-4312-8a00-04b5ffcd3403'.' error #1838

Closed
waldekmastykarz opened this issue May 11, 2018 · 12 comments

Comments

Projects
None yet
6 participants
@waldekmastykarz
Copy link
Member

commented May 11, 2018

Category

  • Question
  • Typo
  • Bug
  • Additional article idea

Expected or Desired Behavior

Connect to the Microsoft Graph from SPFx using the MSGraphClient

Observed Behavior

After adding a web part using the MSGraphClient to the page, you're being redirected to Azure AD where you get the following error:

AADSTS50011: The reply url specified in the request does not match the reply urls configured for the application: 'c58637bb-e2e1-4312-8a00-04b5ffcd3403'.

URL: https://login.microsoftonline.com/69faea77-d304-4dc8-9e2c-95b1e9897054/oauth2/authorize?response_type=id_token%20token&client_id=c58637bb-e2e1-4312-8a00-04b5ffcd3403&resource=c58637bb-e2e1-4312-8a00-04b5ffcd3403&redirect_uri=https%3A%2F%2Fm365x526922.sharepoint.com%2F_forms%2Fspfxsinglesignon.aspx&state=a91f07af-e576-4de7-9f3c-188c17686a8c%7Cc58637bb-e2e1-4312-8a00-04b5ffcd3403&client-request-id=dc6bd7b4-9f3e-4fae-83d2-e5d99aeb598c&x-client-SKU=Js&x-client-Ver=1.0.16&nonce=7a596e19-3e85-466d-8ae0-832c64637b18&prompt=none&iframe-request-id=eb5ff16c-43bd-4d25-a05d-15edfb0d0900

Steps to Reproduce

  • create new SPFx v1.4.1 project with a web part using the MSGraphClient
  • bundle, package and deploy the solution to SharePoint Online
  • add the web part to the page > error

The tenant is using 2018-05-04.012 release of the SharePoint Framework

@VesaJuvonen

This comment has been minimized.

Copy link
Contributor

commented May 15, 2018

This can be resolved by going to modern Admin UI where the permissions are managed. Those pages will automatically make sure that your tenant has the correct configuration. This is not done if you only use PowerShell or other routes for the permission management. This is a bug which will be resolved, but the admin UI trick is a short-term workaround.

@jignesh84

This comment has been minimized.

Copy link

commented Jul 24, 2018

Can you please provide specific steps for this?

@joewashek

This comment has been minimized.

Copy link

commented Aug 29, 2018

I am also receiving this error in my SPFX app. Which admin UI do we make this change? Sharepoint admin? azure ad?

@waldekmastykarz

This comment has been minimized.

Copy link
Member Author

commented Aug 29, 2018

  • go to https://yourtenant-admin.sharepoint.com
  • in the upper-right corner, click the Try the preview button, that will take you to the new SharePoint admin center
  • from the sidebar, click the API management link

Opening this page should trigger provisioning the necessary configuration.

@advdberg

This comment has been minimized.

Copy link

commented Sep 26, 2018

@waldekmastykarz We experience the same error in our customer's environment. The workaround mentioned is not solving the issue. I can see the App id of the SharePoint Online Client Extensi... app differs from the one in the SPFx graph authentication call:

image

image

I guess that's the main cause of this error. Already contacted MS Support but no fix from their side yet...

I also guess that removing the OOTB app registration of SPFx is not the solution for this?!

@waldekmastykarz

This comment has been minimized.

Copy link
Member Author

commented Sep 26, 2018

Which version of the SharePoint Framework are you using @advdberg?

@advdberg

This comment has been minimized.

Copy link

commented Sep 26, 2018

for this app SharePoint Framework v1.4.1

@waldekmastykarz

This comment has been minimized.

Copy link
Member Author

commented Sep 27, 2018

Could you check if you can repro the issue on SPFx@1.6.0? There were quite a few changes related to AAD in 1.6.0 and it could be that the version you're using doesn't work correctly with the GA version of the server configuration.

@advdberg

This comment has been minimized.

Copy link

commented Oct 1, 2018

Thanks for the suggestion, we'll try to update the solution to 1.6.0 and check if that's the fix

@JakeStanger

This comment has been minimized.

Copy link

commented Oct 4, 2018

Having the same problem on 1.6.0 here, none of the workarounds seem to do anything.

@JakeStanger

This comment has been minimized.

Copy link

commented Oct 5, 2018

Looked into this further. I see a lot of the libraries are hard-coding the aformentioned GUID in many places. Our SP Client Online app in Azure AD has a different ID. Doing a find and replace all in node_modules, switching the hard-coded ID for our app ID got it working.

Obviously this is a far from ideal solution. Any ideas?

@advdberg

This comment has been minimized.

Copy link

commented Oct 9, 2018

@waldekmastykarz @JakeStanger We’ve managed to update our solution to SharePoint Framework 1.6 (with some help from the CLI, thanks Waldek 👍) and this seems to be (at least part of) the solution for this issue. The only thing else I can imagine of is that we also replaced an old PnP Graph call used in the solution by a call with the MSGraphClient so maybe that was also part of the issue...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.