About This Page
This page is part of the Azure documentation. It contains code examples and configuration instructions for working with Azure services.
Bias Analysis
Bias Types:
⚠️
powershell_heavy
⚠️
windows_first
⚠️
windows_tools
⚠️
missing_linux_example
Summary:
The documentation demonstrates a Windows bias, particularly in the permissions section, where only PowerShell scripts and Windows batch (.bat) scripts are provided for role creation and cleanup tasks. There are no equivalent examples or guidance for Linux or cross-platform environments (e.g., Bash, Azure CLI). Windows tools and patterns (PowerShell, .bat scripts) are mentioned exclusively and before any Linux alternatives, which are absent.
Recommendations:
- Provide equivalent Azure CLI examples for all PowerShell scripts, especially for role creation and assignment.
- Include Bash shell script examples alongside .bat scripts for cleanup and automation tasks.
- Explicitly mention cross-platform compatibility and provide instructions for both Windows and Linux/macOS users.
- Where possible, use platform-agnostic tools (e.g., Azure CLI, REST API) in examples and documentation.
- Add notes or links to official documentation for performing the same tasks on Linux/macOS.
Create pull request
Flagged Code Snippets
#New Portals Admin Role
Import-Module Az
Connect-AzAccount
$contributorRole = Get-AzRoleDefinition "API Management Service Contributor"
$customRole = $contributorRole
$customRole.Id = $null
$customRole.Name = "APIM New Portal Admin"
$customRole.Description = "This role gives the user ability to log in to the new Developer portal as administrator"
$customRole.Actions = "Microsoft.ApiManagement/service/users/token/action"
$customRole.IsCustom = $true
$customRole.AssignableScopes.Clear()
$customRole.AssignableScopes.Add('/subscriptions/<subscription-id>')
New-AzRoleDefinition -Role $customRole
New-AzRoleAssignment -SignInName "user1@contoso.com" -RoleDefinitionName "APIM New Portal Admin" -Scope "/subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.ApiManagement/service/<apim-service-name>/users/1"
cd scripts.v3
.\cleanup.bat
cd ..