- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe to Topic
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
CSP - Role assignment for a subscription via API
Hi Community
We want replace our powershell role assignment with REST API. I had a looke at what APIs are available and have came up with these possible APIs:
1. List All Roles : https://management.azure.com/{scope}/providers/Microsoft.Authorization/roleDefinitions?api-version={api-version}&$filter={filter}
2. Get ObjectID : {baseURL}/v1/customers/{customer-tenant-id}/users HTTP/1.1
Q. Is the "id" in the response the objectID?
3. Assign the Roles: https://management.azure.com/{scope}/providers/Microsoft.Authorization/roleAssignments/{role-assignment-id}?api-version={api-version}
Q. Do CSP requires permission from the customer to assign role to a subscription via APIs?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hello and welcome to the Community!
I'd like to determine how to best get you the support you need - can you let me know if you are currently working with a CSP Indirect Provider, or do you have a direct CSP relationship with Microsoft?
Thanks,
Jenny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hi Jenny,
Thanks for your response. We currently have direct CSP relationship with Microsoft.
Thanks,
KL
- Mark as New
- Bookmark
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Thanks!
I'm tagging @Anonymous who is the SME for API in Partner Center to assist.
