Skip to content

Latest commit

 

History

History
70 lines (44 loc) · 2.96 KB

tutorial-cli-app-node-sign-in-prepare-tenant.md

File metadata and controls

70 lines (44 loc) · 2.96 KB
title description author manager ms.author ms.service ms.subservice ms.topic ms.date ms.custom
Tutorial: Prepare your external tenant to sign in users in a Node.js CLI app
Learn how to register and configure a Node.js CLI application to signs in users in an external tenant
Dickson-Mwendia
mwongerapk
dmwendia
entra-external-id
customers
tutorial
08/04/2023
developer, devx-track-js

Tutorial: Prepare your external tenant to sign in users in a Node.js CLI app

This tutorial series demonstrates how to build a Node.js command line interface (CLI) app and prepare it for authentication using the Microsoft Entra admin center. You'll use the Microsoft Authentication Library for Node (MSAL Node) library to authenticate your app with your external tenant. Finally, you'll run the application and test the sign-in and sign-out experiences.

In this tutorial;

[!div class="checklist"]

  • Register a Node.js CLI app in the Microsoft Entra admin center, and record its identifiers
  • Define the platform and URLs
  • Grant permissions to the Node CLI app to access the Microsoft Graph API
  • Create a sign in and sign out user flow in Microsoft Entra admin center.
  • Associate your Node.js CLI app with a user flow.

Prerequisites

  • A Microsoft Entra ID for external tenant. If you don't have one, create a trial tenant or a tenant with a subscription before you begin.
  • This Azure account must have permissions to manage applications. Any of the following Microsoft Entra roles include the required permissions:
    • Application Administrator
    • Application Developer
    • Cloud Application Administrator

Register the Node.js CLI app

[!INCLUDE active-directory-b2c-register-app]

Add platform configurations

[!INCLUDE active-directory-b2c-app-integration-add-platform-configurations]

[!INCLUDE active-directory-b2c-enable-public-client-flow]

Grant admin consent

[!INCLUDE active-directory-b2c-grant-delegated-permissions]

Create a user flow

[!INCLUDE active-directory-b2c-app-integration-add-user-flow]

Associate the Node.js CLI application with the user flow

[!INCLUDE active-directory-b2c-app-integration-add-user-flow]

Next step

Prepare your app to sign in users in an external tenant:

[!div class="nextstepaction"] Part 2: Prepare a Node.js CLI application for authentication