I have to import some roles, in the documentation it states. The frist uid is easy to find, but what is the second one. When I look into the portal I see that the role is assigned on the resource itself, but can't find a trace of a uid. Can find the uid of the group what has the rights but ..
terraform import azurerm_role_assignment.example /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/00000000-0000-0000-0000-000000000000
So Bottom line, anybody has this working and willing to share some thoughts ?
You can also use the Azure Resource Explorer portal to browse your resource definitions.
Use the tree view on the left to browse your resources; generally the structure's pretty intuitive.
To avoid clicking through, the URIs are pretty predictable too...
To see role assignments against a subscription substitute your subscription's GUID in the following URI: https://resources.azure.com/subscriptions/00000000-0000-0000-0000-000000000000
/providers/Microsoft.Authorization/roleAssignments
To do the same for a resource group, substitute your subscription's GUID and resource group's name for the placeholder values in this URI: https://resources.azure.com/subscriptions/00000000-0000-0000-0000-000000000000
/resourceGroups/MyResourceGroup
/providers/Microsoft.Authorization/roleAssignments
Note: If you paste in one of these URIs directly it takes a few moments for the right page to load / the page may refresh a few times, so if you don't see the page you'd expect, wait up to 10 seconds.
On this page, you'll see a JSON value, where the info you're after is under value
> properties
> id
.
You can use Azure CLI:
az role assignment list ...
https://learn.microsoft.com/en-us/cli/azure/role/assignment?view=azure-cli-latest#az-role-assignment-list
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With