0

I want to obtain role assignment information from Azure Purview instances using REST API calls in my application. The desired information is the email addresses and groups under each role as indicated by the red arrows in the image at the end.

I have tried to follow the Microsoft doc (link) and tried the API below.

GET {Endpoint}/policyStore/metadataRoles?api-version=2021-07-01-preview

However, I could only get the default metadata roles in the response, such as

purviewmetadatarole_builtin_data-source-administrator

I am new to Purview, so please forgive me if this is a silly question. Is there an API that can properly extract role assignment information?

Image - Role assignment information is indicated by red arrows

1 Answers1

0

Metadata Roles – List REST API returns the list roles for Azure Purview Account.

enter image description here

Metadata Policy - List All REST API returns the list or Get metadata polices for Azure Purview Account.

enter image description here

Note: This attribute Value will be Object ID of the user/app registered in the Azure Active Directory.

enter image description here

Metadata Policy - Get REST API returns Gets a metadata policy for Azure Purview Account.

Note: Make sure to replace the {policyId} with the above value.

enter image description here

CHEEKATLAPRADEEP
  • 12,191
  • 1
  • 19
  • 42
  • Thank you so much for answering the question. I tried the api you provided, and it worked. However, I could only get the object IDs of the service principals, groups and users, instead of their names. I used the api by following this document: [https://learn.microsoft.com/en-us/graph/api/directoryobject-getbyids?view=graph-rest-1.0&tabs=http] However, I was not able to authenticate and got errors. Could you please enlighten me on how I can give the api call the proper permission to get the names? Thanks a lot in advance. – Jesse Yang Apr 20 '22 at 04:00
  • @JesseYang As I said earlier, it returns attribute Value will be `Object ID` of the user/app registered in the Azure Active Directory. – CHEEKATLAPRADEEP Apr 20 '22 at 04:20