This document provides a comprehensive guide to managing users within your Microsoft App Services environment. Effective user management is crucial for security, access control, and operational efficiency.
App Services supports a granular role-based access control (RBAC) system. Understanding these roles is the first step to managing users effectively.
For more specific needs, you can create custom roles with precisely defined permissions tailored to your organizational structure and security policies.
You can manage users and their role assignments directly through the Azure portal or programmatically using the Azure CLI or Azure PowerShell.
To add a user with the Contributor role to a resource group:
az role assignment create --role "Contributor" --assignee "user@example.com" --resource-group "MyResourceGroup"
To remove a role assignment:
az role assignment delete --assignee "user@example.com" --role "Contributor" --resource-group "MyResourceGroup"
| Operation | Description | HTTP Method | Endpoint |
|---|---|---|---|
| List Role Assignments | Retrieves all role assignments for a scope. | GET | /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/roleAssignments |
| Create Role Assignment | Creates a new role assignment. | PUT | /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName} |
| Delete Role Assignment | Deletes a role assignment. | DELETE | /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName} |
Issue: User cannot access App Service resources.
Solution: Verify that the user has been assigned the correct role with appropriate permissions for the specific resource or scope. Check for any conflicting deny assignments.
Issue: Accidental deletion of a user role assignment.
Solution: Use Azure Activity Logs to identify when the assignment was deleted and who performed the action. Recreate the assignment as needed. Consider implementing Azure Policy to prevent accidental deletions of critical role assignments.