> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blinkops.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List Role Assignments For Resource

List all role assignments that apply to a resource.

* **Least privileged** Azure RBAC action required: `Microsoft.Authorization/roleAssignments/read`.
* **Built-in role** that grants access: `Reader`.

<Note>
  External Documentation

  To learn more, visit the [Azure documentation](https://learn.microsoft.com/en-us/rest/api/authorization/role-assignments/list-for-resource?view=rest-authorization-2022-04-01\&tabs=HTTP).
</Note>

## Parameters

<div className="integrations-table">
  | Parameter                   | Description                                                                                                                                                                                                                                   |
  | --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | Filter                      | The filter to apply on the operation.<br /><br />**For example**:<br />\* Use `atScope()` to return all role assignments at or above the scope.<br />\* Use `principalId eq {id}` to return all role assignments for the specified principal. |
  | Resource Group Name         | The name of the resource group. The name is case insensitive.                                                                                                                                                                                 |
  | Resource Name               | The name of the resource to get role assignments for.                                                                                                                                                                                         |
  | Resource Provider Namespace | The namespace of the resource provider.<br /><br />**For example**: `Microsoft.Compute`.                                                                                                                                                      |
  | Resource Type               | The resource type of the resource.<br /><br />**For example**: virtualMachines.                                                                                                                                                               |
  | Subscription ID             | The ID of the target subscription.                                                                                                                                                                                                            |
  | Tenant ID                   | The tenant ID for a cross-tenant request.                                                                                                                                                                                                     |
</div>

## Example Output

```json theme={"dark"}
{
	"value": [
		{
			"name": "b0f43c54-e787-4862-89b1-a653fa9cf747",
			"type": "Microsoft.Authorization/roleAssignments",
			"id": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg/providers/Microsoft.DocumentDb/databaseAccounts/test-db-account/providers/Microsoft.Authorization/roleAssignments/b0f43c54-e787-4862-89b1-a653fa9cf747",
			"properties": {
				"roleDefinitionId": "/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d",
				"principalId": "ce2ce14e-85d7-4629-bdbc-454d0519d987",
				"principalType": "User",
				"scope": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg/providers/Microsoft.DocumentDb/databaseAccounts/test-db-account"
			}
		}
	]
}
```

## Workflow Library Example

[List Role Assignments for Resource with Azure and Send Results Via Email](https://library.blinkops.com/workflows/list-role-assignments-for-resource-with-azure-and-send-results-via-email)

<div className="iframe-wrapper">
  <div className="iframe-media">
    <img src="https://mintcdn.com/blinkops-2/ojHYuDeYX5FWuN8a/img/Icons/play-box.svg?fit=max&auto=format&n=ojHYuDeYX5FWuN8a&q=85&s=b8af968e71438a9499c3223c9bd29fb2" alt="Workflow Library" width="16" height="16" data-path="img/Icons/play-box.svg" />

    Preview this Workflow on desktop
  </div>

  <iframe className="iframe" src="https://library.blinkops.com/workflows/list-role-assignments-for-resource-with-azure-and-send-results-via-email/canvas" />
</div>
