active-directory-b2c-dotnet-desktop | Sample showing how a Windows desktop | Azure library

 by   Azure-Samples C# Version: 244739 License: MIT

kandi X-RAY | active-directory-b2c-dotnet-desktop Summary

kandi X-RAY | active-directory-b2c-dotnet-desktop Summary

active-directory-b2c-dotnet-desktop is a C# library typically used in Institutions, Learning, Education, Cloud, Azure applications. active-directory-b2c-dotnet-desktop has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

Sample showing how a Windows desktop .NET (WPF) application can sign in a user using Azure AD B2C, get an access token using MSAL.NET and call an API.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              active-directory-b2c-dotnet-desktop has a low active ecosystem.
              It has 63 star(s) with 36 fork(s). There are 51 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 3 open issues and 25 have been closed. On average issues are closed in 219 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of active-directory-b2c-dotnet-desktop is 244739

            kandi-Quality Quality

              active-directory-b2c-dotnet-desktop has 0 bugs and 0 code smells.

            kandi-Security Security

              active-directory-b2c-dotnet-desktop has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              active-directory-b2c-dotnet-desktop code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              active-directory-b2c-dotnet-desktop 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

              active-directory-b2c-dotnet-desktop releases are available to install and integrate.
              Installation instructions are not available. Examples and code snippets are available.

            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 active-directory-b2c-dotnet-desktop
            Get all kandi verified functions for this library.

            active-directory-b2c-dotnet-desktop Key Features

            No Key Features are available at this moment for active-directory-b2c-dotnet-desktop.

            active-directory-b2c-dotnet-desktop Examples and Code Snippets

            Step 3: Register your own Web API with Azure AD B2C
            C#dot img1Lines of Code : 7dot img1License : Permissive (MIT)
            copy iconCopy
            cd ..
            git clone https://github.com/Azure-Samples/active-directory-b2c-javascript-nodejs-webapi.git
            
            var tenantID = ".onmicrosoft.com";
            var clientID = "";
            var policyName = "";
            
            npm install && npm update
            node index.js
              
            copy iconCopy
            git clone https://github.com/Azure-Samples/active-directory-b2c-dotnet-desktop.git
              

            Community Discussions

            QUESTION

            Error Acquring token for Azure AD B2C on native app (WPF) executable file
            Asked 2022-Feb-15 at 15:31

            I Have created an native app (WPF) where the authentication system is based on Azure AD B2C. I have been following the documentation here:

            Configure authentication in a sample WPF

            WPF Sample

            And everything works...

            But when I create an executable file and install it on another machine the errors begin.

            Here is the error message:

            ...

            ANSWER

            Answered 2022-Feb-15 at 15:31

            I had the same problem and managed to fix it: The reason was the cache file which is used, it gives problems if the cache file of another User/PC is read. So in the TokenCacheHelper I do set the username in the filename.

            Example:

            Source https://stackoverflow.com/questions/70288696

            QUESTION

            No access token returned for AD B2C user when requesting Microsoft Graph delegated permissions
            Asked 2020-Jul-02 at 09:36

            User Story: Given an ADB2C User, with Global Administrator role and an oid of 01234567-901a-bcde-f012-3456789abcde (not a real oid), I want to be able to log in as that user and retrieve the user profile from "https://graph.microsoft.com/beta/me" or "https://graph.microsoft.com/beta/users/01234567-901a-bcde-f012-3456789abcde". Both are listed in the documentation as valid endpoints for B2C.

            It's not working:

            In an app registration with only Microsoft Graph permission scopes assigned, I used postman to request a bearer token for access to MS Graph. There is one Web redirect URI (https://oauth.pstmn.io/v1/callback), one client secret, and implicit grant is on for both access and id tokens.

            The scopes requested are: openid offline_access https://graph.microsoft.com/Directory.AccessAsUser.All

            Again, the B2C user account has the Global Administrator role.

            • The Implicit flow returns the error message

            AADB2C90205: This application does not have sufficient permissions against this web resource to perform the operation.

            • The Authorization Code flow, when the app secret is included, lacks an access bearer token. There is an ID token and a refresh token, but no access token. That's with and without PKCE, whether or not I send the authorization to an external browser.

            The app in my tenant has a user flow, B2C_1_postman, which is basically default. It works just fine with postman, other test apps, and the "Run User Flow" function in the B2C management blade.

            The auth endpoint is:

            ...

            ANSWER

            Answered 2020-Jun-10 at 05:59

            Managing users through Graph API still seems to require usage of application permissions. So instead of adding delegated permissions to the app in B2C, you need to add application permissions, where you call the Graph API as the app, not on behalf of the user. The instructions in the docs explain the app registration in detail: https://docs.microsoft.com/en-us/azure/active-directory-b2c/microsoft-graph-get-started

            You need to give this app application permissions to Graph API, not delegated permissions. Then use those app credentials purely to call Graph API. And you need to use the underlying Azure AD's token endpoint instead of your B2C policy token endpoint.

            Since your app is a desktop app (a public client app), you'll need to do the Graph API interactions in a back-end service to which you can authenticate with a B2C token acquired on behalf of the user.

            Source https://stackoverflow.com/questions/62275609

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

            Vulnerabilities

            No vulnerabilities reported

            Install active-directory-b2c-dotnet-desktop

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

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

            Find more libraries

            Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link