This page contains Windows bias

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
⚠️ missing_linux_example
Summary:
The documentation page demonstrates a Windows bias by providing only PowerShell examples for creating custom roles, referencing Azure PowerShell prominently, and omitting equivalent Azure CLI or cross-platform scripting examples. While Azure CLI and REST API are mentioned as alternatives for role assignment, no concrete examples are provided for these tools, and the only code sample is in PowerShell. This may disadvantage Linux or macOS users who are more likely to use Azure CLI or scripting languages other than PowerShell.
Recommendations:
  • Provide equivalent Azure CLI examples alongside PowerShell code samples for all major operations, especially for creating and assigning custom roles.
  • Explicitly mention that all operations can be performed using Azure CLI and REST API, and link to relevant documentation or include sample commands.
  • Consider including Bash or cross-platform scripting examples where appropriate.
  • Ensure that references to tools and workflows do not assume a Windows environment or PowerShell as the default.
GitHub Create pull request

Scan History

Date Scan ID Status Bias Status
2025-07-12 23:44 #41 in_progress ❌ Biased
2025-07-12 00:58 #8 cancelled ✅ Clean
2025-07-10 05:06 #7 processing ✅ Clean
2025-07-09 23:22 #6 cancelled ✅ Clean

Flagged Code Snippets

$role = Get-AzRoleDefinition "API Management Service Reader Role" $role.Id = $null $role.Name = 'Calculator API Contributor' $role.Description = 'Has read access to Contoso APIM instance and write access to the Calculator API.' $role.Actions.Add('Microsoft.ApiManagement/service/apis/write') $role.Actions.Add('Microsoft.ApiManagement/service/apis/*/write') $role.AssignableScopes.Clear() $role.AssignableScopes.Add('/subscriptions/<Azure subscription ID>/resourceGroups/<resource group name>/providers/Microsoft.ApiManagement/service/<APIM service instance name>/apis/<API name>') New-AzRoleDefinition -Role $role 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>'