Introduction: In this blog, we will see how to assign licenses to newly created users in Azure AD using Power Automate.
Steps to be followed:
- Create Group in Azure Active Directory
- Assign licenses to the group
- Add user in Group
Create Group in Azure Active Directory
- Login to Azure.
- Go to Azure Active Directory
- Go to Groups
- Click on “+New group”
- Enter details
- Group type: Security
- Group name: Enter name for your group
- Group description: Enter description of your group
Click on Create.
- Open your newly created group
- Copy the Object Id of the group(we require this in power automate)
- Go to Licenses
- Click on “+Assignments”
- Select the licenses which you want to assign and click on save.
- Your group has license now.
We have successfully created a group and assigned licenses to the group. Now we will add users in that group using power automate.
Assigning Licenses to user (Adding user in Group) using Power Automate
- Go to Power Automate
- Search for Azure AD connector and select “Add user to group” action
- Enter the values in Group Id and User Id.
- Group Id: Paste the object id of the group which we created in azure.
- User Id: enter the user id.
Running the flow:
NOTE: You must have a Global administrator or User administrator role to assign licenses to users.