Is there no nuget package for accessing the method "AddMicrosoftIdentityPlatformAuthentication"? I'm trying to add authentication to my existing .NET Core app.
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
@aaronjones1 Thanks for the question. We are investigating the issue and will update you shortly.
I figured it out. The "AddMicrosoftIdentityPlatformAuthentication" method is from this GitHub project: https://github.com/Azure-Samples/active-directory-aspnetcore-webapp-openidconnect-v2
I had to download the whole solution, copy the Microsoft.Identity.Web project from it, manually add it to my existing .NET Core solution, add a reference to Microsoft.Identity.Web project, and then add "using Microsoft.Identity.Web;" to the top of my startup.cs class.
It would be helpful to mention at the top of this article that the "Microsoft.Identity.Web" project is required, and link to the GitHub page.
Thanks for your feedback, @aaronjones.
I'm a bit confused because we provided hyperlinks to the code in https://github.com/Azure-Samples/active-directory-aspnetcore-webapp-openidconnect-v2 throughout the whole article. I'm trying to understand if this is not sufficient? (apparently they were not obvious to you?)
Can you please confirm that you'd want an explanation about "Microsoft.Identity.Web" on top of each article?
That's fair. My confusion, though, was not where to go to find that project. The problem was that I didn't know I needed that project. I thought this particular article didn't depend on the sample project, so I was following it as a template to try and add authentication to my existing .NET Core app.
Thanks for sharing your views. I hope this is clarified now. Please let us know in case you have any additional queries on this . We will close this by the End of day today in case we do not hear from you.
Thank you.
@aaronjones1, I see your point. The issue is it's complex to combine ASP;NET Core, Identity model extensions for .NET (the .NET middleware which does the token validation), and MSAL.NET in a clean way. In the past the code snippets were showing (expanded) the code that would be needed, but I got the feedback that the code would better be aligned with the sample, which tries to show reusable code that you can use in your applications.
Okay, thank you for the explanation! Integration with Microsoft Graph is an important part of the design of our new web app and .NET Core has seemed like the way to go in every other respect so far. I hope the MS Graph piece won't be too difficult to figure again. Thanks again for your responses!
@aaronjones1 Thank you . Should you have any difficulties with the MS graph piece , you can always open a thread on the Azure AD MSDN forums and we will surely help you with the same. If its related to some documentation , please do open the same on the documentation page itself.
Thanks.
@aaronjones1 : the same sample is an incremental tutorial one step of which is calling MSGraph (See https://github.com/Azure-Samples/active-directory-aspnetcore-webapp-openidconnect-v2/tree/master/2-WebApp-graph-user/2-1-Call-MSGraph). Also the scenario "Web app signs-in users" is followed by Web app calls Graph
Oh, should've caught that. Thank you!