Skip to content

Commit a03bd73

Browse files
authored
Merge pull request #191549 from dlepow/patch-94
Update api-management-role-based-access-control.md
2 parents de5ae10 + ad3ed91 commit a03bd73

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

articles/api-management/api-management-role-based-access-control.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ If none of the built-in roles meet your specific needs, custom roles can be crea
4646
> [!NOTE]
4747
> To be able to see an API Management instance in the Azure portal, a custom role must include the ```Microsoft.ApiManagement/service/read``` action.
4848
49-
When you create a custom role, it's easier to start with one of the built-in roles. Edit the attributes to add **Actions**, **NotActions**, or **AssignableScopes**, and then save the changes as a new role. The following example begins with the "API Management Service Reader" role and creates a custom role called "Calculator API Editor." You can assign the custom role to a specific API. Consequently, this role only has access to that API.
49+
When you create a custom role, it's easier to start with one of the built-in roles. Edit the attributes to add **Actions**, **NotActions**, or **AssignableScopes**, and then save the changes as a new role. The following example begins with the "API Management Service Reader" role and creates a custom role called "Calculator API Editor." You can assign the custom role at the scope of a specific API. Consequently, this role only has access to that API.
5050

5151
```powershell
5252
$role = Get-AzRoleDefinition "API Management Service Reader Role"
@@ -56,9 +56,9 @@ $role.Description = 'Has read access to Contoso APIM instance and write access t
5656
$role.Actions.Add('Microsoft.ApiManagement/service/apis/write')
5757
$role.Actions.Add('Microsoft.ApiManagement/service/apis/*/write')
5858
$role.AssignableScopes.Clear()
59-
$role.AssignableScopes.Add('/subscriptions/<subscription ID>/resourceGroups/<resource group name>/providers/Microsoft.ApiManagement/service/<service name>/apis/<api ID>')
59+
$role.AssignableScopes.Add('/subscriptions/<Azure subscription ID>/resourceGroups/<resource group name>/providers/Microsoft.ApiManagement/service/<APIM service instance name>/apis/<API name>')
6060
New-AzRoleDefinition -Role $role
61-
New-AzRoleAssignment -ObjectId <object ID of the user account> -RoleDefinitionName 'Calculator API Contributor' -Scope '/subscriptions/<subscription ID>/resourceGroups/<resource group name>/providers/Microsoft.ApiManagement/service/<service name>/apis/<api ID>'
61+
New-AzRoleAssignment -ObjectId <object ID of the user account> -RoleDefinitionName 'Calculator API Contributor' -Scope '/subscriptions/<subscription ID>/resourceGroups/<resource group name>/providers/Microsoft.ApiManagement/service/<APIM service instance name>/apis/<API name>'
6262
```
6363

6464
The [Azure Resource Manager resource provider operations](../role-based-access-control/resource-provider-operations.md#microsoftapimanagement) article contains the list of permissions that can be granted on the API Management level.

0 commit comments

Comments
 (0)