This package provides a collection of custom nodes for interacting with Azure services in Node-RED.
This node retrieves an access token for authenticating Azure API requests.
It requires the msg.config.Azure.clientId
, msg.config.Azure.clientSecret
, and msg.config.Azure.tenantId
properties to be set.
The access token is then available in msg.access_token
and can be used by other nodes.
This node retrieves the Azure ID of a user based on their email address.
It requires the msg.access_token
and msg.emails
properties to be set.
The node returns the user's ID in msg.usersId
.
This node checks if a group exists in Azure Active Directory based on its name.
It requires the msg.group_name
and msg.access_token
properties to be set.
If the group exists, its ID is returned in msg.groupID
. If there are multiple groups with the same name, an exception is thrown.
This node creates a security group in Azure Active Directory.
It requires the msg.group_name
, msg.group_desc
, and msg.access_token
properties to be set.
The created group will have an empty groupTypes
, mailEnabled
set to false
, and securityEnabled
set to true
.
The group's name and description will be provided by the client, and its mailNickname
will be a concatenation of the string 'Authomize_' and the msg.group_name
.
The node returns the group's ID in msg.groupID
.
This node checks if a user is a member of a group in Azure Active Directory.
It requires the msg.access_token
, msg.usersId
, msg.emails
, msg.group_name
, and msg.groupID
properties to be set.
This node acts as a switch, passing the msg
object through different outputs depending on the response.
This node adds users to a group in Azure Active Directory.
It requires the msg.access_token
, msg.usersId
, msg.emails
, msg.group_name
, and msg.groupID
properties to be set.
The node returns the original msg
object without modifying it and prints a message indicating that the user has been added to the group.
This node removes users from a group in Azure Active Directory.
It requires the msg.access_token
, msg.usersId
, msg.emails
, msg.group_name
, and msg.groupID
properties to be set.
The node returns the original msg
object without modifying it and prints a message indicating that the user has been removed from the group.
This node disables a user in Azure Active Directory.
It requires the msg.access_token
, msg.emails
, and msg.usersId
properties to be set.
The node returns the original msg
object without modifying it and prints a message indicating that the user has been disabled in Azure.
-
Install the node-red-azure-nodes package using npm: npm i node-red-azure-nodes
-
In your Node-RED flow, you will find the Azure nodes under the "Authomize Azure" category in the Node-RED palette.
-
Drag and drop the desired nodes into your flow and configure their properties as required.
-
Connect the nodes to create the desired workflow.
Contributions, bug reports, and feature requests are welcome!
This project is licensed under the MIT License.