Building an ASP.NET Application with Azure AD Authentication

Authenticate Users with Azure Active Directory (Azure AD)

Question

You are building a Microsoft ASP.NET application that requires authentication.

You need to authenticate users by using Azure Active Directory (Azure AD).

What should you do first?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D. E.

B

Register your application to use Azure Active Directory. Registering the application means that your developers can use Azure AD to authenticate users and request access to user resources such as email, calendar, and documents.

https://docs.microsoft.com/en-us/azure/active-directory/manage-apps/developer-guidance-for-integrating-applications

To authenticate users in an ASP.NET application using Azure AD, the first step is to create an app registration in Azure AD. This app registration will enable the application to use Azure AD for authentication.

Option B is the correct answer.

Here are the steps to create an app registration in Azure AD for authenticating an ASP.NET application:

  1. Open the Azure portal and sign in with your Azure AD account.

  2. Navigate to the Azure AD section and select "App registrations" from the left-hand menu.

  3. Click on the "New registration" button to create a new app registration.

  4. Enter a name for the app registration and select the supported account types (single tenant or multi-tenant).

  5. Enter the Redirect URI for the ASP.NET application. This URI is used by Azure AD to redirect users back to the application after they have been authenticated.

  6. Once the app registration is created, note down the Application (client) ID and Tenant ID. These values will be used in the ASP.NET application to authenticate users.

  7. Next, configure the ASP.NET application to use Azure AD for authentication. This involves updating the web.config file with the Azure AD app registration details.

  8. Finally, test the authentication by running the ASP.NET application and attempting to log in with an Azure AD user account.

Options A, C, D, and E are not the correct answers for authenticating an ASP.NET application using Azure AD.

Option A involves assigning an enterprise application to users and groups, which is not relevant to the authentication process.

Option C involves configuring the application to use a SAML endpoint, which is not necessary when using Azure AD for authentication.

Option D involves creating a new OAuth token from the application, which is not relevant to the Azure AD authentication process.

Option E involves creating a membership database in an Azure SQL database, which is also not relevant to the authentication process.