is there any way in api for azure subscription role assignments

Belaguli Vijayakumar, Adarsha 21 Reputation points
2020-03-03T04:35:16.297+00:00

In Azure portal,
Under Home - Subscriptions - Microsoft Azure - Access control (IAM) - Role Assignments tab - I want to add New Role assignment.
Is there any possibilitlity to achieve this using microsoft partner api rather than manually using portal UserInterface?
If yes, Please give detailed steps to use the api.

Microsoft Partner Center API
Microsoft Partner Center API
Microsoft Partner Center: A Microsoft website for partners that provides access to product support, a partner community, and other partner services.API: A software intermediary that allows two applications to interact with each other.
312 questions
0 comments No comments
{count} votes

Accepted answer
  1. Dennis Guo 316 Reputation points
    2020-03-04T08:26:44.247+00:00

    We can use REST API below to achieve it.

    https://management.azure.com/subscriptions/CustomerSubscriptionID/providers/Microsoft.Authorization/roleAssignments/GUID(need to generated)?api-version=2015-07-01  
    

    The following article with step by step for your reference.

    How to use REST API to assign CSP subscription roles to new created CSP customer .

    More information:

    Add or remove role assignments using Azure RBAC and the REST API

    Add or remove role assignments using Azure RBAC and Azure PowerShell

    2 people found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. soumi-MSFT 11,716 Reputation points Microsoft Employee
    2020-03-03T06:01:10.847+00:00

    @Belaguli Vijayakumar, Adarsha , The Microsoft Partner API can only perform the following operations as documented here:

    1. Create a referral
    2. Update a referral
    3. Get a list of referrals
    4. Get a referral by ID
    5. Get a price sheet
    6. Get foreign exchange rates

    You can consider using Microsoft Graph API if you intend to programatically perform the New Role Assignment for RBAC. To perform Role Assignments using Microsoft Graph API, you can find the API details here.

    Hope this helps. Please do mark this response as "Answered" if the response helped in answering your query.