ms-identity-aspnet-webapp-openidconnect | sample showcasing how to develop a web application | Azure library

 by   Azure-Samples C# Version: msal1.1.4 License: MIT

kandi X-RAY | ms-identity-aspnet-webapp-openidconnect Summary

kandi X-RAY | ms-identity-aspnet-webapp-openidconnect Summary

ms-identity-aspnet-webapp-openidconnect is a C# library typically used in Cloud, Azure applications. ms-identity-aspnet-webapp-openidconnect has no vulnerabilities, it has a Permissive License and it has low support. However ms-identity-aspnet-webapp-openidconnect has 3 bugs. You can download it from GitHub.

This sample showcases how to develop a web application that handles sign using the Microsoft identity platform. It shows you how to use the new unified signing-in model that can be used to sign-in users to the app with both their work/school account (Azure AD account) or Microsoft account (MSA). The application is implemented as an ASP.NET MVC project, while the web sign-on functionality is implemented via ASP.NET OpenId Connect OWIN middleware. The sample also shows how to use MSAL.NET (Microsoft Authentication Library) to obtain an access token for Microsoft Graph. Specifically, the sample shows how to retrieve the last email messages received by the signed in user, and how to send a mail message as the user using Microsoft Graph. Finally, the sample showcases a new capability introduced by the new Microsoft identity platform - the ability for one app to seek consent for new permissions incrementally. For more information about how the protocols work in this scenario and other scenarios, see Authentication Scenarios for Azure AD. For more information about Microsoft Graph, please visit the Microsoft Graph homepage.

            kandi-support Support

              ms-identity-aspnet-webapp-openidconnect has a low active ecosystem.
              It has 120 star(s) with 69 fork(s). There are 52 watchers for this library.
              It had no major release in the last 12 months.
              There are 6 open issues and 20 have been closed. On average issues are closed in 218 days. There are 1 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of ms-identity-aspnet-webapp-openidconnect is msal1.1.4

            kandi-Quality Quality

              ms-identity-aspnet-webapp-openidconnect has 3 bugs (0 blocker, 0 critical, 1 major, 2 minor) and 0 code smells.

            kandi-Security Security

              ms-identity-aspnet-webapp-openidconnect has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              ms-identity-aspnet-webapp-openidconnect code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              ms-identity-aspnet-webapp-openidconnect is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              ms-identity-aspnet-webapp-openidconnect releases are available to install and integrate.
              Installation instructions are not available. Examples and code snippets are available.
              ms-identity-aspnet-webapp-openidconnect saves you 3472 person hours of effort in developing the same functionality from scratch.
              It has 7437 lines of code, 0 functions and 35 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of ms-identity-aspnet-webapp-openidconnect
            Get all kandi verified functions for this library.

            ms-identity-aspnet-webapp-openidconnect Key Features

            No Key Features are available at this moment for ms-identity-aspnet-webapp-openidconnect.

            ms-identity-aspnet-webapp-openidconnect Examples and Code Snippets

            No Code Snippets are available at this moment for ms-identity-aspnet-webapp-openidconnect.

            Community Discussions


            How to store and retrieve Access Token using MSAL in
            Asked 2022-Mar-09 at 22:42

            I am working on ASP.Net MVC classic application. This app get a access token to gain access the resource in the API. Once it get the access token then I want to store it and use it when I need it to call the API in different controller. However, I want to :

            Store, retrieve and refresh and want to have understanding of AcquireTokenSilently().

            We may get the token after user sign-in in Startup.cs and then it can be saved and retrieve to access API. So, it might be checked for expire token and then refresh or acquire token silently to access API resource. So whatever flow makes sense.

            I have read several document for MSAL but did not get the clear picture and getting confused by AcquireTokenSilently(), Refresh(). Please see the below code where I am accessing token but I am not storing it.



            Answered 2022-Mar-07 at 17:57

            You don't store it. MSAL does. It has a token cache built in to it. This cache is application specific so that it will need to acquire a token the first time each application is run. You can also use a Broker to pull a token from the OS that is associated with the current user logged on.



            Azure SSO (sample code) not working while hosting in custom website in IIS
            Asked 2020-Aug-27 at 07:25

            I am trying out the sample code of the Microsoft identity platform to add authentication and authorization to web applications. The sample from the link ( is working well in IIS Express. When I try to host the same with a custom website in IIS, it is not working as expected. The steps which I have followed, and problems occurred are mentioned below.


            1. The index page of the sample code has Sign in with Microsoft button

            2. When clicking Sign in with Microsoft, it prompts for the username and password.

            3. After entering the credentials, the index page is updated with the logged-in username


            1. The same application is hosted in a custom website in IIS. Here also while clicking the Sign in with Microsoft, it prompts for username and password

            2. After entering the username and password, it is being redirected to the index page.

            3. But the issue occurring is that the username is not updated and again showing the Sign in with Microsoft as the ClaimsPrincipal class cannot get the username

            I cannot understand why this is happening meanwhile the same app is working well in IIS Express. Please help me around this. Thank you.



            Answered 2020-Aug-27 at 07:25

            With the help of Microsoft azure dev support I was able to find the root cause. We have to have slash(/) at the end of the redirect-uri value like the below one.


            Community Discussions, Code Snippets contain sources that include Stack Exchange Network


            No vulnerabilities reported

            Install ms-identity-aspnet-webapp-openidconnect

            You can download it from GitHub.


            Use Stack Overflow to get support from the community. Ask your questions on Stack Overflow first and browse existing issues to see if someone has asked your question before. Make sure that your questions or comments are tagged with [msal dotnet microsoft-graph]. If you find a bug in the sample, please raise the issue on GitHub Issues. To provide a recommendation, visit the following User Voice page.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
          • HTTPS


          • CLI

            gh repo clone Azure-Samples/ms-identity-aspnet-webapp-openidconnect

          • sshUrl


          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Reuse Pre-built Kits with ms-identity-aspnet-webapp-openidconnect

            Consider Popular Azure Libraries

            Try Top Libraries by Azure-Samples


            by Azure-SamplesPython


            by Azure-SamplesHTML


            by Azure-SamplesC#