node-red-contrib-msal 0.0.2
Login node using msal
node-red-contrib-msal
Node RED node to authenticate using MSAL.
Mainly based on Azure docs and samples
Installation via the Web-Interface
- Open the menu in the upper right corner
- Choose Manage Palette
- Under Install, search for: node-red-contrib-msal
Installation via the command line
- Navigate to your Node RED user directory, usally
$HOME/.node-red
- Run the following command:
npm install node-red-contrib-msal
Prerequisites
Already registered App on Azure Portal.
Usage
This node is using Redirect Method
of msal
Enter:
Scopes
: e.g. user.read or https://management.azure.com/.default...Init URL
: Url that will lead to Azure Login: /login2azureLocal Redirect URL
: RedirectUrl that will listen on Azure Login Response: /redirect
Note: On Azure Portal you have to add the complete REDIRECT URL !!!
Running NR onhttp://localhost:1880
then you have to addhttp://localhost:1880/redirect
for your app in Azure Portal !
This node will patch up the complete REDIRECT URL on its own and pass it to msal!
Node can receive msg.update = true
object to do a silent renewal of token.
Node will send msal processed response object. The included accessToken can be use to trigger http node to do REST call on Azure API
Config Node
- Application (client) ID
- Application (client) Secret
- Authority (
https://login.microsoftonline.com/<tenantId>
orhttps://login.microsoftonline.com/common
...)