Files
azure-node-playground/README.md

1.0 KiB

Azure Node Playground

This repository contains sample code for authenticating and interacting with Azure services using Node.js. It demonstrates how to use the Microsoft Authentication Library (MSAL) to acquire tokens and access various Azure resources.

How to impersonate Azure CLI

Azure CLI is a well-known public application that can be used to authenticate and access Azure resources. To impersonate Azure CLI in your Node.js application, you can use the following configuration:

Use interactive login or device code flow to authenticate as Azure CLI. Use the following configuration parameters:

  • Application (client) ID: 04b07795-8ddb-461a-bbee-02f9e1bf7b46
  • Tenant ID: your tenant ID

You can verify the application ID of Azure CLI by running the following command in your terminal:

az account get-access-token --scope "https://management.azure.com/.default" --debug

and then look for the client_id field in the debug output. Unfortunately, you can't use az ad app show to get details about this public application.