microsoftgraph / aspnetcore-connect-sample

[ARCHIVED] This ASP.NET Core MVC sample shows how to connect to Microsoft Graph using delegated permissions and the Azure AD v2.0 (MSAL) endpoint.
MIT License
123 stars 96 forks source link

Default port did not work, seemed to cause sign in to fail #17

Closed jayschauer closed 6 years ago

jayschauer commented 6 years ago

Expected behavior: sample should work using the default port listed in the readme (44334)

Actual behavior: sample loads the home page, and upon entering my email to sign in, I am redirected to this url: "https://login.microsoftonline.com/login.srf". It seems like something is trying to be loaded, but it eventually stops. If I reenter that url, I am taken to the page "https://www.office.com/?auth=2".

My fix: Change the port in the project (launch and app settings files) and in the app registration's redirect url to "44328"

How I decided on this port: When the login.srf page redirected me to the office.com page, in the list of applications, in the category of "other", was an application called "graph explorer". This sounded like it could be relevant. When I clicked it, I was brought to localhost:44328/. So I figured that might be the port I should use. Then I applied my fix listed above, and the sample works.

jthake commented 6 years ago

Did you follow the steps to create an app registration? It appears you didn't put the reply url in correctly... This repo is actually used to generate the ASP.NET quick start found here https://developer.microsoft.com/en-us/graph/quick-start

jayschauer commented 6 years ago

Thanks for following up with this issue, but I can't actually follow up on it anymore because I don't have access to the code anymore.

jthake commented 6 years ago

OK. I will close this then. sorry for slow response on this.