Anmelden von Benutzern bei einer exemplarischen ASP.NET-Webanwendung - Microsoft Entra (2023)

  • Artikel

In dieser Anleitung wird ein Beispiel ASP.NET-Webanwendung verwendet, um die Grundlagen der modernen Authentifizierung mithilfe derMicrosoft-Authentifizierungsbibliothek für .NETundMicrosoft Identity Webfür ASP.NET zur Verarbeitung der Authentifizierung zu veranschaulichen.

In diesem Artikel registrieren Sie eine Webanwendung im Microsoft Entra Admin Center und erstellen einen Anmelde- und Abmeldebenutzerflow. Sie ordnen Ihre Webanwendung dem Benutzerflow zu, laden und aktualisieren ein Beispiel ASP.NET Webanwendung mithilfe Ihres eigenen Azure Active Directory (Azure AD) für Kundenmandantendetails. Abschließend führen Sie die Beispielwebanwendung aus und testen Sie sie.

Voraussetzungen

  • Obwohl jede IDE, die ASP.NET-Anwendungen unterstützt, verwendet werden kann, wird in dieser Anleitung Visual Studio Code verwendet. Sie können sie auf der SeiteDownloadsherunterladen.
  • .NET7.0 SDK.
  • Azure AD für Kunden-Mandant. Falls Sie noch nicht über die Anwendung verfügen, können Sie sichfür eine kostenlose Testversion registrieren.

Registrieren der Web-App

Damit über Ihre Anwendung Benutzer mit Microsoft Entra angemeldet werden können, muss Azure Active Directory (Azure AD) für Kunden mit der von Ihnen erstellten Anwendung kompatibel sein. Durch die App-Registrierung wird eine Vertrauensstellung zwischen der Anwendung und Microsoft Entra eingerichtet. Wenn Sie eine Anwendung registrieren, generiert Azure AD einen eindeutigen Bezeichner, dieAnwendungs-ID (Client-ID). Dieser Wert wird zum Identifizieren Ihrer Anwendung beim Erstellen von Authentifizierungsanforderungen verwendet.

Die folgenden Schritte veranschaulichen, wie Sie Ihre Anwendung im Microsoft Entra Admin Center registrieren:

  1. Melden Sie sich beimMicrosoft Entra Admin Centerein.

  2. Wenn Sie Zugriff auf mehrere Mandanten haben, achten Sie darauf, das Verzeichnis zu verwenden, das Ihren Azure AD für Kunden-Mandanten enthält:

    1. Wählen Sie aus der Symbolleiste das SymbolVerzeichnisse und Abonnementsaus.

    2. Suchen Sie auf der SeitePortaleinstellungen > Verzeichnisse und AbonnementsIhr Verzeichnis „AzureADfür Kunden“ in der Liste derVerzeichnisnamen, und wählen Sie dannWechselnaus.

  3. Wählen Sie im SeitenleistenmenüAzure Active Directoryaus.

  4. Wählen SieAnwendungenund dannAnwendungsregistrierungenaus.

  5. Wählen Sie+ Neue Registrierungaus.

  6. Geben Sie auf der daraufhin angezeigten SeiteAnwendung registrierendie Registrierungsinformationen Ihrer Anwendung ein:

    1. Geben Sie im AbschnittNameeinen aussagekräftigen Anwendungsnamen ein, der den Benutzern der Anwendung angezeigt werden soll (beispielsweiseciam-client-app).

    2. Wählen Sie unterUnterstützte Kontotypendie OptionNur Konten in diesem Organisationsverzeichnisaus.

  7. Wählen SieRegistrieren.

  8. DerBereich „Übersicht“der Anwendung wird angezeigt, wenn die Registrierung abgeschlossen ist. Notieren Sie sich dieVerzeichnis-ID (Mandant)und dieAnwendungs-ID (Client), die im Quellcode Ihrer Anwendung verwendet werden sollen.

    (Video) OPS113 From WS2008 to Azure with containers

Definieren der Plattform und der URLs

Führen Sie die folgenden Schritte aus, um den Anwendungstyp für Ihre Anwendungsregistrierung anzugeben:

  1. Wählen Sie unterVerwaltendie OptionAuthentifizierungaus.

  2. Wählen Sie auf der SeitePlattformkonfigurationendie OptionPlattform hinzufügenund dann die OptionNetzaus.

  3. Geben Sie fürUmleitungs-URIsden Werthttps://localhost:7274/signin-oidcein, und wählen Sie dannKonfigurierenaus.

  4. Geben Sie auf der SeitePlattenkonfigurationzum Abmelden dieFrontkanal-Abmelde-URLhttps://localhost:7274/signout-callback-oidcein.

  5. Wählen SieSpeichern, um Ihre Änderungen zu speichern.

Hinzufügen eines geheimen Clientschlüssels für die Anwendung

Erstellen Sie einen geheimen Clientschlüssel für die registrierte Anwendung. Die Anwendung verwendet den geheimen Clientschlüssel beim Anfordern von Token als Identitätsnachweis.

  1. Wählen Sie auf der SeiteApp-Registrierungendie von Ihnen erstellte Anwendung (z.B.ciam-client-app) aus, um ihre SeiteÜbersichtzu öffnen.

  2. Wählen Sie unterVerwaltendie OptionZertifikate und Geheimnisseaus.

  3. Wählen SieNeuer geheimer Clientschlüssel.

  4. Geben Sie im FeldBeschreibungeine Beschreibung für den geheimen Clientschlüssel ein (z.B.Jetzt ist die Client-App geheim).

  5. Wählen Sie unterGültig biseinen Gültigkeitszeitraum für den geheimen Schlüssel (gemäß den jeweiligen Sicherheitsregeln Ihrer Organisation) und dannHinzufügenaus.

  6. Notieren Sie denWertdes Geheimnisses. Dieser Wert wird in einem späteren Schritt für die Konfiguration verwendet.

Hinweis

Der Wert des Geheimnisses wird nicht mehr angezeigt und kann anderweitig nicht abgerufen werden, nachdem Sie die Seite „Zertifikate und Geheimnisse“ verlassen haben. Notieren Sie ihn also.
Um die Sicherheit zu verbessern, sollten SieZertifikateanstelle von geheimen Clientschlüsseln verwenden.

Gewähren von API-Berechtigungen

  1. Wählen Sie auf der SeiteApp-Registrierungendie von Ihnen erstellte Anwendung (z.B.ciam-client-app) aus, um ihre SeiteÜbersichtzu öffnen.

  2. Wählen Sie unterVerwaltendie OptionAPI-Berechtigungen.

    (Video) How to Fix a 406 Error and Find the Source of the Problem

  3. Wählen Sie unterKonfigurierte Berechtigungendie OptionBerechtigung hinzufügenaus.

  4. Wählen Sie die RegisterkarteMicrosoft-APIsaus.

  5. Wählen Sie unterHäufig verwendete Microsoft-APIsdie OptionMicrosoft Graphaus.

  6. Wählen SieDelegierte Berechtigungenaus.

  7. Suchen Sie im AbschnittBerechtigungen auswählendie Berechtigungenopenidundoffline_access, und wählen Sie beide aus.

  8. Wählen Sie die SchaltflächeBerechtigungen hinzufügenaus.

  9. Sie haben die Berechtigungen nun ordnungsgemäß zugewiesen. Da der Mandant jedoch der Mandant eines Kunden ist, können die Consumer-Benutzer selbst diesen Berechtigungen nicht zustimmen. Zum Beheben dieses Problems müssen Sie als Administrator im Namen aller Benutzer im Mandanten diesen Berechtigungen zustimmen:

    1. Wählen SieAdministratorzustimmung für erteilenund dannUndaus.

    2. Wählen SieAktualisierenaus, und vergewissern Sie sich, dass für beide Bereiche unterStatusder StatusErteilt für angezeigt wird.

Erstellen eines Benutzerflows

Führen Sie die folgenden Schritte aus, um einen Benutzerflow zu erstellen, den ein Kunde zum Anmelden oder Registrieren für eine Anwendung verwenden kann.

  1. Melden Sie sich beimMicrosoft Entra Admin Centerein.

  2. Wenn Sie Zugriff auf mehrere Mandanten haben, achten Sie darauf, das Verzeichnis zu verwenden, das Ihren Azure AD für Kunden-Mandanten enthält:

    1. Wählen Sie aus der Symbolleiste das SymbolVerzeichnisse und Abonnementsaus.

    2. Suchen Sie auf der SeitePortaleinstellungen > Verzeichnisse und AbonnementsIhr Verzeichnis „AzureADfür Kunden“ in der Liste derVerzeichnisnamen, und wählen Sie dannWechselnaus.

  3. Wählen Sie im SeitenleistenmenüAzure Active Directoryaus.

  4. Wählen SieExterne Identitätenund wählen Sie dannBenutzerflowsaus.

  5. Wählen Sie+Neuer Benutzerflowaus.

  6. Gehen Sie auf der SeiteErstellenfolgendermaßen vor:

    (Video) Go on Azure: Part 3—Go on Web Apps and Azure Kubernetes Service | Azure Friday

    1. Geben Sie einenNamenfür den Benutzerflow ein, z.B.SignInSignUpSample.

    2. Wählen Sie in der ListeIdentitätsanbieterdie OptionE-Mail-Inhaltaus. Dieser Identitätsanbieter bietet Benutzern die Möglichkeit, sich mit ihrer Email-Adresse anzumelden oder zu registrieren.

      Hinweis

      Weitere Identitätsanbieter werden hier nur aufgeführt, nachdem ein Verbund mit ihnen eingerichtet wurde. Wenn Sie beispielsweise einen Verbund mitGoogleoderFacebookeinrichten, können Sie diese zusätzlichen Identitätsanbieter hier auswählen.

    3. UnterE-Mail-Inhaltkönnen Sie eine der beiden Optionen auswählen. Wählen Sie für dieses TutorialEmail mit Kennwortaus.

      • Email mit Kennwort: Ermöglicht es neuen Benutzern, sich mit einer E-Mail-Adresse als Anmeldenamen und einem Kennwort als ersten Faktor der Anmeldeinformationen zu registrieren und anzumelden.

      • Email mit Einmal-Passcode: Ermöglicht es neuen Benutzern, sich mit einer E-Mail-Adresse als Anmeldenamen und einem Einmal-Passcode als ersten Faktor der Anmeldeinformationen zu registrieren und anzumelden.

        Hinweis

        Email mit Einmal-Passcode muss auf Mandantenebene (Alle Identitätsanbieter>Email mit Einmal-Passcode) aktiviert sein, damit diese Option auf Benutzerflowebene verfügbar ist.

    4. Wählen Sie unterBenutzerattributedie Attribute aus, die Sie vom Benutzer bei der Registrierung erfassen möchten. Wenn SieMehr anzeigenauswählen, können Sie Attribute und Ansprüche fürLand/Region,AnzeigenameundPostleitzahlauswählen. Klicken Sie aufOK. (Benutzer werden nur zur Eingabe von Attributen aufgefordert, wenn sie sich zum ersten Mal registrieren.)

  7. Klicken Sie aufErstellen. Der neue Benutzerflow wird in der ListeBenutzerflowsangezeigt. Aktualisieren Sie die Seite bei Bedarf.

Führen Sie die Schritte im ArtikelAktivieren der Self-Service-Kennwortzurücksetzungaus, um die Self-Service-Kennwortzurücksetzung zu aktivieren.

Zuordnen der Webanwendung zum Benutzerflow

Obwohl ihrem Benutzerflow viele Anwendungen zugeordnet werden können, kann eine einzelne Anwendung nur einem Benutzerflow zugeordnet werden. Ein Benutzerflow ermöglicht die Konfiguration der Benutzeroberfläche für bestimmte Anwendungen. Sie können beispielsweise einen Benutzerflow konfigurieren, bei dem sich Benutzer mit einer Telefonnummer oder E-Mail-Adresse anmelden oder registrieren müssen.

  1. Wählen Sie im SeitenleistenmenüAzure Active Directoryaus.

  2. Wählen SieExterne Identitätenund dannBenutzerflowsaus.

  3. Wählen Sie den zuvor erstellten Benutzerflow für die Self-Service-Registrierung in der Liste aus, z.B.SignInSignUpSample.

    (Video) Technology Stacks - Computer Science for Business Leaders 2016

  4. Wählen Sie unterVerwendendie OptionAnwendungenaus.

  5. Wählen SieAnwendung hinzufügenaus.

  6. Wählen Sie die Anwendung in der Liste aus, z.B.ciam-client-app, oder verwenden Sie das Suchfeld, um die Anwendung zu suchen, und wählen Sie dann die Anwendung aus.

  7. Klicken Sie aufAuswählen.

Klonen oder Herunterladen der Beispiel-Webanwendung

Zum Abrufen des Beispielcodes der Web-App können Sie einen der folgenden Schritte ausführen:

  • ZIP-Datei herunterladen. Extrahieren Sie die Beispieldatei in einen Ordner, bei dem der Pfad eine Gesamtlänge vonmaximal 260Zeichen aufweist.

  • Klonen Sie die exemplarische Webanwendung vom GitHub, indem Sie den folgenden Befehl ausführen:

    Git-Klon https://github.com/Azure-Samples/ms-identity-ciam-dotnet-tutorial.git

Konfigurieren der Anwendung

  1. Navigieren Sie zum Stammordner des heruntergeladenen Beispiels und zum Verzeichnis, das die ASP.NET Beispiel-App enthält:

    cd 1-Authentication\1-sign-in-aspnet-core-mvc
  2. Öffnen Sie die Dateiappsettings.json.

  3. Suchen Sie inAutoritätnachEnter_the_Tenant_Subdomain_Hier, und ersetzen Sie den Platzhalter durch die Unterdomäne Ihres Mandanten. Wenn Ihre primäre Mandantendomäne beispielsweisecaseyjensen@onmicrosoft.comlautet, müssen Sie den Wertdie lässigen Jeanseingeben.

  4. Suchen Sie den WertEnter_the_Application_Id_Hier, und ersetzen Sie ihn durch die Anwendungs-ID (clientId) der App, die Sie im Microsoft Entra Admin Center registriert haben.

  5. Ersetzen SieEnter_the_Client_Secret_Heredurch den Wert des geheimen Clientschlüssels, den Sie ingeheimer App-Clientschlüssel hinzufügen)eingerichtet haben.

Ausführen des Codebeispiels

  1. Führen Sie die folgenden Befehle über die Shell oder die Befehlszeile aus:

    Dotnet-Lauf
  2. Öffnen Sie Ihren Webbrowser, und navigieren Sie zuhttps://localhost:7274.

  3. Melden Sie sich mit Konto an, das beim Kundenmandanten registriert ist.

  4. Nach der Anmeldung wird der Anzeigename neben der SchaltflächeAbmeldenangezeigt, wie im folgenden Screenshot dargestellt.

    Anmelden von Benutzern bei einer exemplarischen ASP.NET-Webanwendung - Microsoft Entra (1)

  5. Um sich von der Anwendung abzumelden, wählen Sie die SchaltflächeAbmeldenaus.

Nächste Schritte

  • Aktivieren der Kennwortzurücksetzung
  • Anpassen des Standard-Brandings
  • Konfigurieren der Anmeldung mit Google
  • Anmelden von Benutzern bei Ihrer eigenen ASP.NET-Webanwendung mithilfe eines Azure AD für Kundenmandanten

FAQs

How do I add Microsoft authentication to my website? ›

Get started with add sign in with microsoft
  1. App registration. Get started by registering your application. Register.
  2. Authentication libraries. Download our cross-platform authentication libraries. Download.
  3. Branding guidelines. Follow our visual and brand guidelines. Learn more.

What is Microsoft Identity platform? ›

The Microsoft identity platform helps you build applications your users and customers can sign in to using their Microsoft identities or social accounts. It authorizes access to your own APIs or Microsoft APIs like Microsoft Graph.

How does Azure AD SSO work? ›

Azure Active Directory Seamless single sign-on (Azure AD Seamless SSO) automatically signs users in when they are on their corporate devices connected to your corporate network. When enabled, users don't need to type in their passwords to sign in to Azure AD, and usually, even type in their usernames.

How do I add Azure AD authentication to existing ASP NET application? ›

In the New ASP.NET Project dialog, select MVC, and then click Change Authentication. On the Change Authentication dialog, select Organizational Accounts. These options can be used to automatically register your application with Azure AD as well as automatically configure your application to integrate with Azure AD.

How do I add a device to Microsoft Authentication? ›

Add a trusted device to your Microsoft account
  1. On the device you want to trust, go to the Security settings page and sign in to your Microsoft account.
  2. You'll be prompted to verify your identity. ...
  3. Select the check box for Don't ask me again on this device.
  4. Select Verify.

How do I add an account to Microsoft Authentication app? ›

Add account to Microsoft Authenticator
  1. Open the Microsoft Authenticator app on your phone.
  2. Tap the + > Work or school account.
  3. Use your phone to scan the QR square that is on your computer screen. Notes: ...
  4. Your account will be added automatically to the app and will display a six-digit code.

What is the purpose of Microsoft Defender for Identity? ›

Microsoft Defender for Identity is a cloud-based security solution that leverages your on-premises Active Directory signals to identify, detect, and investigate advanced threats, compromised identities, and malicious insider actions directed at your organization.

What is the purpose of identity server? ›

Identity Server implements authentication service and policy administration to regulate access to a company's information and applications. These features make it possible to verify that a user is who he says he is, and that the user is authorized to access web or application servers deployed within the enterprise.

What is the difference between asp net individual accounts and Microsoft Identity platform? ›

ASP.NET Core Identity is a traditional individual authentication platform. You create and manage users, and allow those users to authenticate, specific to one app. Microsoft Identity Platform is a centralized authentication and authorization platform, independent of any one particular application.

What is a SSO login? ›

Single sign-on (SSO) is an identification method that enables users to log in to multiple applications and websites with one set of credentials. SSO streamlines the authentication process for users.

What is the difference between AD authentication and SSO? ›

AD and SSO are very different; one is an on-prem directory service — the authoritative source of identities, the other a cloud-based, web app identity extension point solution that federates the identities from a core directory to web applications.

What is SSO application? ›

Single sign-on (SSO) is a technology which combines several different application login screens into one. With SSO, a user only has to enter their login credentials (username, password, etc.) one time on a single page to access all of their SaaS applications.

How do I authenticate an Azure application? ›

In the Azure portal menu, select Resource groups, or search for and select Resource groups from any page. In Resource groups, find and select your resource group. In Overview, select your app's management page. On your app's left menu, select Authentication, and then click Add identity provider.

How to enable authentication in asp net? ›

  1. Windows Authentication (also known as Negotiate, Kerberos, or NTLM authentication) can be configured for ASP.NET Core apps hosted with IIS, Kestrel, or HTTP. ...
  2. Add the NuGet package Microsoft.AspNetCore.Authentication.Negotiate and authentication services by calling AddAuthentication in Program.cs :
Mar 16, 2023

What is Azure Active Directory authentication? ›

Azure AD Multi-Factor Authentication lets users choose an additional form of authentication during sign-in, such as a phone call or mobile app notification. This ability reduces the requirement for a single, fixed form of secondary authentication like a hardware token.

How do I link my device to my Microsoft account? ›

Go to account.microsoft.com/devices, sign in, and select Register device to continue. Enter your device's serial number to register it to your account. Select your device to see its warranty information.

How do I access Microsoft authentication? ›

Go to your personal Microsoft account sign-in page, and then instead of typing your password, select the Use the Microsoft Authenticator app instead link. Microsoft sends a notification to your phone. Approve the notification.

How to add account to Microsoft Authenticator without QR code? ›

Open the Authenticator app, select Add account from the Customize and control icon in the upper-right, select Other account (Google, Facebook, etc.), and then select OR ENTER CODE MANUALLY. Enter an Account name (for example, Google) and type the Secret key from Step 1, and then select Finish.

How do I find my secret key on the Authenticator app? ›

Procedure
  1. Open the interface you want to log on to. For example, go to the Web Console site.
  2. Enter your login credentials, and then click OK. Your login fails because two-factor authentication is enabled.
  3. Click OK to close the Login Error message. ...
  4. Access the secret key: ...
  5. Save the secret key.
Dec 9, 2022

How do I reset Microsoft authentication app? ›

Go to the security settings of your Microsoft account, either on a web browser or on a different device. Click on the "Security info" option and sign in to your account. Under the "Security info" section, locate the "Authenticator app" and click on "Manage". Click on the "Remove" option next to the lost device.

How do I reset my Microsoft Authenticator without my old phone? ›

What if you don't have access to Microsoft Authenticator on your old phone? If you no longer have your old phone, it was stolen, lost or damaged, you'll need to contact Microsoft Support. The virtual agent will ask if the answers are helpful or not, click “No” to then have the option to talk to a person for help.

What are the three uses of Microsoft Defender? ›

Windows Security includes Microsoft Defender Antivirus software that protects your Windows device and data against viruses, ransomware, trojans, and other malware unless a non-Microsoft Antivirus is active.

Should you turn off Microsoft Defender? ›

But don't disable Defender unless you have another antivirus program ready to be installed. That's because without active anti-virus protection, you're exposed to a massive security risk. It's also not advisable to run multiple antivirus programs at the same time.

How do I set up Microsoft Defender for identity? ›

What to expect
  1. Create a Defender for Identity instance.
  2. Connect an instance to Windows Server Active Directory.
  3. Install a Defender for Identity sensor.
  4. Set up the portal and setting preferences.

How does identity authentication work? ›

Identity authentication matches provided information with what is stored in the database to further prove the identity of a person online. This is often done with the use of a password. The provided password is matched with the one stored in the database to authenticate the user's identity.

What is the difference between identity provider and authorization server? ›

Comparing the Two. In summary, an identity provider is the software component that authenticates and issues a token representing a user or other entity, while an authorization server is the server software component that validates and provides tokens that represent a user or other entity.

How do web servers prove their identity? ›

In authentication, the user or computer has to prove its identity to the server or client. Usually, authentication by a server entails the use of a user name and password. Other ways to authenticate can be through cards, retina scans, voice recognition, and fingerprints.

Is a Gmail account a Microsoft account? ›

First of all, they're different accounts. Your original Gmail address is your Google account, and it gives you access to Google's services and devices. Even if it's associated with a Gmail address, your Microsoft account is a different account that gives you access only to Microsoft's devices and services.

How do I know if my Microsoft account is personal or business? ›

In Windows 10, click on Settings / Accounts. At the top it will show the logged in account. If you are signed in with a Microsoft Personal account, it will show your Microsoft Personal email address with a link that says “Manage my Microsoft account.”

What account does ASP.NET run under? ›

By default, many ASP.NET applications run under the “NETWORK SERVICE” identity (in other Windows environment, applications run under “ASPNET” by default) as assigned through the application pool context.

Where is SSO token stored? ›

SSO stores a combination of (Guid, Token, Expiry) on the server, where Guid is a random guid and Expiry is something like 30 seconds.

What does SSO use to authenticate? ›

A user browses to the application or website they want access to, aka, the Service Provider. The Service Provider sends a token that contains some information about the user, like their email address, to the SSO system, aka, the Identity Provider, as part of a request to authenticate the user.

What is the difference between social login and SSO? ›

The difference between single sign-on and social login

With SSO (single sign-on), you don't need to worry about implementing a separate login system; instead, you just provide one password that works across all of your connected accounts.

Where is Kerberos used? ›

Kerberos support is built in to all major computer operating systems, including Microsoft Windows, Apple macOS, FreeBSD and Linux. Since Windows 2000, Microsoft has used the Kerberos protocol as the default authentication method in Windows, and it is an integral part of the Windows Active Directory (AD) service.

Which is better LDAP or SSO? ›

Integration: LDAP will usually be more recognizable to users across different applications. For example, using an SSO system will allow a user to access multiple platforms with web portals. LDAP, however, might be a key technology that syncs email contacts in an email client.

What does SSO active mean? ›

Single sign-on is an authentication method that allows users to sign in using one set of credentials to multiple independent software systems. Using SSO means a user doesn't have to sign in to every application they use.

What comes under SSO in Google Apps? ›

You can configure your Cloud Identity or Google Workspace account to use single sign-on (SSO). When you enable SSO, users aren't prompted to enter a password when they try to access Google services. Instead, they are redirected to an external identity provider (IdP) to authenticate.

How do I enable SSO in web application? ›

Configure Single Sign-On for Web Applications Last Updated May 23, 2023
  1. In the SAC Admin Portal, create or edit a web application for which to configure SSO. ...
  2. Under Single Sign-On, select an authentication type: ...
  3. Save. ...
  4. (If using JWT Token) Enable user groups in JWT authentication:

What is Microsoft provider authentication secret? ›

The option to create a new registration is selected by default. You can change the name of the registration or the supported account types. A client secret will be created and stored as a slot-sticky application setting named MICROSOFT_PROVIDER_AUTHENTICATION_SECRET .

What is endpoint for Microsoft account authentication? ›

Authorization common endpoint is https://login.microsoftonline.com/common/oauth2/v2.0/authorize . Token common endpoint is https://login.microsoftonline.com/common/oauth2/v2.0/token . For single-tenant applications, replace "common" in the previous URLs with your tenant ID or name.

What is the client ID of Azure Web App? ›

1 answer
  • Login to the Azure Portal.
  • Navigate to Azure Active Directory.
  • Select App Registrations , locate the Azure AD App that you're trying to find the Client ID and Client Secret Key for.
  • Within the Azure AD App, select Certificates & Secrets.

Where do you set authentication mode in ASP.NET application? ›

Configure security settings in the Web. config File
  1. In Solution Explorer, open the Web. config file.
  2. Change the authentication mode to Forms.
  3. Insert the <Forms> tag, and fill the appropriate attributes. ...
  4. Deny access to the anonymous user in the <authorization> section as follows:
Jan 24, 2022

How to add Basic Authentication in ASP.NET web API? ›

In IIS Manager, go to Features View, select Authentication, and enable Basic authentication. In your Web API project, add the [Authorize] attribute for any controller actions that need authentication. A client authenticates itself by setting the Authorization header in the request.

How to use authentication and authorization in ASP.NET with example? ›

Authentication is knowing the identity of the user. For example, Alice logs in with her username and password, and the server uses the password to authenticate Alice. Authorization is deciding whether a user is allowed to perform an action. For example, Alice has permission to get a resource but not create a resource.

What is used to authenticate Active Directory users? ›

Active Directory uses the Kerberos protocol for authentication of its users. The Kerberos authentication protocol succeeds the NTLM protocol.

What does it mean if a service is in private preview mode? ›

Private preview – During this phase we invite a few customers to take part in early access to new concepts and features. This phase does not include formal support. Public preview – During this phase we allow any customer with the proper Azure AD license to evaluate the new feature.

What does Microsoft Active Directory use for authentication? ›

Which Type of Authentication is Used in Active Directory? AD Authentication is a process that typically follows Kerberos protocol, where users have to log in using their credentials to gain access to resources.

How do I add an account to my Microsoft Authenticator code and URL? ›

Open the Authenticator app, select Add account from the Customize and control icon in the upper-right, and then select Work or school account. Select OR ENTER CODE MANUALLY. Enter the Code and URL from Step 1, and then select Finish. The Accounts screen of the app shows you your account name and a verification code.

How do I create a Web authentication? ›

The Basics of Securing the Authentication Process for Your Web Application
  1. Use a Single Failure Message When Users Try to Log In. ...
  2. Implement HTTPS. ...
  3. Hash The Passwords "Slowly" ...
  4. Season the Passwords With Some Salt Before They Get Hashed. ...
  5. Enable Multi-Factor Authentication. ...
  6. Save Sensitive Information Separate From Regular Data.

How to set up multifactor authentication for web apps and office 365 access? ›

In the Microsoft 365 admin center, in the left nav choose Settings > Org settings. Under the Services tab, choose Modern authentication, and in the Modern authentication pane, make sure Enable Modern authentication is selected. Choose Save changes.

Is Microsoft authenticator linked to Microsoft account? ›

The Microsoft Authenticator app backs up your account credentials and related app settings, such as the order of your accounts, to the cloud. Important: You need a personal Microsoft account to act as your recovery account. iOS users must also have an iCloud account.

How do I get my authenticator verification code? ›

Set up Authenticator
  1. On your Android device, go to your Google Account.
  2. At the top, tap the Security tab. If at first you don't get the Security tab, swipe through all tabs until you find it.
  3. Under "You can add more sign-in options," tap Authenticator. ...
  4. Tap Set up authenticator. ...
  5. Follow the on-screen steps.

How do I reinstall my Microsoft authenticator account? ›

Recover your account credentials on your new device
  1. On your mobile device, open the Authenticator app, and select Begin recovery.
  2. Sign in to your recovery account using the personal Microsoft account you used during the backup process. Your account credentials are recovered to the new device.

References

Top Articles
Latest Posts
Article information

Author: Rob Wisoky

Last Updated: 06/06/2023

Views: 5241

Rating: 4.8 / 5 (48 voted)

Reviews: 87% of readers found this page helpful

Author information

Name: Rob Wisoky

Birthday: 1994-09-30

Address: 5789 Michel Vista, West Domenic, OR 80464-9452

Phone: +97313824072371

Job: Education Orchestrator

Hobby: Lockpicking, Crocheting, Baton twirling, Video gaming, Jogging, Whittling, Model building

Introduction: My name is Rob Wisoky, I am a smiling, helpful, encouraging, zealous, energetic, faithful, fantastic person who loves writing and wants to share my knowledge and understanding with you.