Assign licenses to Azure AD users using Power Automate(MS Flow)

Introduction: In this blog, we will see how to assign licenses to newly created users in Azure AD using Power Automate.   

In my previous blog, I have explained how to create a new users in Azure AD using Power Automate.  

Steps to be followed:

  1. Create Group in Azure Active Directory
  2. Assign licenses to the group
  3. Add user in Group

Create Group in Azure Active Directory

  1. Login to Azure.
  2. Go to Azure Active Directory
  1. Go to Groups
  1. Click on “+New group”
  1. Enter details
    • Group type: Security
    • Group name: Enter name for your group
    • Group description: Enter description of your group

Click on Create.

  1. Open your newly created group
  1. Copy the Object Id of the group(we require this in power automate)
  1. Go to Licenses
  1. 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.

In previous blog we saw how to create user in Azure AD using Power Automate.

Assigning Licenses to user (Adding user in Group) using Power Automate

  1. Go to Power Automate
  2. Search for Azure AD connector and select “Add user to group” action
  1. 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.

Entire Flow

Running the flow:

NOTE: You must have a Global administrator or User administrator role to assign licenses to users.

Leave a Reply

Your email address will not be published. Required fields are marked *