How to use REST API to extract role assignment information from a Azure Purview account?

Jesse Yang 1 Reputation point
2022-04-08T02:04:55.23+00:00

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?

191039-image.png

Microsoft Purview
Microsoft Purview
A Microsoft data governance service that helps manage and govern on-premises, multicloud, and software-as-a-service data. Previously known as Azure Purview.
1,056 questions
{count} votes

1 answer

Sort by: Most helpful
  1. PRADEEPCHEEKATLA-MSFT 85,351 Reputation points Microsoft Employee
    2022-04-11T08:52:06.843+00:00

    Hello @Jesse Yang ,

    Thanks for the question and using MS Q&A platform.

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

    191833-image.png

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

    191778-image.png

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

    191827-image.png

    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.

    191834-image.png

    Hope this will help. Please let us know if any further queries.

    ------------------------------

    • Please don't forget to click on 130616-image.png or upvote 130671-image.png button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer. Here is how
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification
    • If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators