![]() You can replace the preceding version with the latest released version under MSAL.js releases.Īlternatively, if you have Node.js installed, you can download the latest version through Node.js Package Manager (npm): npm install msal The quickstart index.html file contains a reference to the library: The MSAL library signs in users and requests the tokens that are used to access an API that's protected by Microsoft identity platform. After you're signed in successfully, your user profile information should be displayed on the page. The first time that you sign in, you're prompted to provide your consent to allow the application to access your profile and to sign you in. Select Sign In to start the sign-in, and then call Microsoft Graph API.Īfter the browser loads the application, select Sign In. To start the server, run the following command from the project directory: npm install Run the project with a web server by using Node.js: For more information, see National cloud deployment For the main or global Microsoft Graph API service, simply enter. is the endpoint that API calls will be made against.To find the value of Supported account types, go to the app registration's Overview page in the Azure portal. To restrict support to personal Microsoft accounts only, replace this value with consumers. If your application supports accounts in any organizational directory and personal Microsoft accounts, replace this value with common.If your application supports accounts in any organizational directory, replace this value with organizations. ![]() To find the value of the Directory (tenant) ID, go to the app registration's Overview page in the Azure portal. If your application supports accounts in this organizational directory, replace this value with the Tenant ID or Tenant name (for example, ).For national clouds (for example, China), see National clouds.Įnter_the_Tenant_info_here is set to one of the following options: For the main or global Azure cloud, simply enter. To find the value of Application (client) ID, go to the app's Overview page in the Azure portal.Įnter_the_Cloud_Instance_Id_Here is the instance of the Azure cloud. Įnter_the_Application_Id_Here is the Application (client) ID for the application you registered. Select Access Tokens and ID Tokens under the Implicit grant and hybrid flows.Under Platform Configurations > Add a platform.This quickstart requires the Implicit grant flow to be enabled.On the app Overview page, note the Application (client) ID value for later use. Users of your app might see this name, and you can change it later. Under Manage, select App registrations > New registration.Search for and select Azure Active Directory.In the top menu to select the tenant in which you want to register an application. If you have access to multiple tenants, use the Directory + subscription filter.Option 2 (Manual): Register and manually configure your application and code sample Step 1: Register your application Follow the instructions to download and automatically configure your new application.Under Supported account types, select Accounts in any organizational directory and personal Microsoft accounts.Go to the Azure portal - App registrations quickstart experience.Option 1 (Express): Register and auto configure your app and then download your code sample To start your quickstart application, use either of the following options. Register and download your quickstart application
0 Comments
Leave a Reply. |