How can I create a user using REST API?


How can I create user in azure using rest API of and also assign license to it.
Is there any ARM Templates for it?

Azure Active Directory
Azure Active Directory
An Azure enterprise identity service that provides single sign-on and multi-factor authentication.
13,554 questions
No comments
{count} votes

Accepted answer
  1. JamesTran-MSFT 27,666 Reputation points Microsoft Employee

    anonymous user
    Thank you for your post! I was able to do this using Postman and the Azure Management REST APIs.

    Get all users within your Azure API Management service:



    Create a user within your Azure API Management service:

      "properties": {  
        "firstName": "foo",  
        "lastName": "bar",  
        "email": "",  
        "confirmation": "signup"  


    Create or Update a subscription:

      "properties": {  
        "ownerId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/57127d485157a511ace86ae7",  
        "scope": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5600b59475ff190048060002",  
        "displayName": "testsub"  

    For more info - Subscriptions

    I hope this helps! If you have any other questions, please let me know.
    Thank you for your time and patience throughout this issue.


    Please remember to "Accept Answer" if any answer/reply helped, so that others in the community facing similar issues can easily find the solution.

1 additional answer

Sort by: Most helpful
  1. Cristian SPIRIDON 4,301 Reputation points

    If Microsoft Graph API is an option, there is a Gitub repo with examples for creating users and assign licenses:

    Hope this helps.

    1 person found this answer helpful.
    No comments