Sad Tux - Windows bias detected
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

Detected Bias Types
powershell_heavy
windows_first
Summary
The documentation provides both PowerShell and Azure CLI examples for granting Microsoft Graph permissions, but PowerShell is presented first and in greater detail. PowerShell is traditionally associated with Windows environments, and the initial emphasis may suggest a Windows-centric workflow. There are no explicit Linux shell (bash) examples, nor is there mention of Linux-specific tools or patterns. The instructions reference Visual Studio (a Windows-first IDE) for enabling managed identity, with no mention of alternatives for Linux users.
Recommendations
  • Alternate the order of PowerShell and Azure CLI examples, or present Azure CLI (cross-platform) first.
  • Add explicit bash shell examples where possible, especially for steps that can be performed outside PowerShell.
  • Mention cross-platform IDEs (such as VS Code) and deployment methods for enabling managed identity, not just Visual Studio.
  • Clarify that both PowerShell and Azure CLI are available on Windows, Linux, and macOS, and provide installation instructions for each platform.
  • Ensure screenshots and UI instructions do not assume a Windows environment.
GitHub Create Pull Request

Scan History

Date Scan Status Result
2026-01-12 00:00 #99 completed Biased Biased
2026-01-11 06:20 #98 completed Clean Clean
2026-01-11 00:00 #95 cancelled Clean Clean
2026-01-10 00:00 #92 completed Biased Biased
2026-01-09 00:00 #87 cancelled Biased Biased
2026-01-06 22:28 #78 completed Clean Clean
2025-12-29 18:00 #48 cancelled Biased Biased
2025-12-22 00:00 #24 cancelled Clean Clean
2025-12-15 00:00 #7 completed Clean Clean
2025-12-14 05:05 #6 completed Clean Clean

Flagged Code Snippets

    # Install the module.
    # Install-Module Microsoft.Graph -Scope CurrentUser
    
    # The tenant ID
    $TenantId = "aaaabbbb-0000-cccc-1111-dddd2222eeee"
    
    # The name of your web app, which has a managed identity.
    $webAppName = "SecureWebApp-20201106120003" 
    $resourceGroupName = "SecureWebApp-20201106120003ResourceGroup"
    
    # The name of the app role that the managed identity should be assigned to.
    $appRoleName = "User.Read.All"
    
    # Get the web app's managed identity's object ID.
    Connect-AzAccount -Tenant $TenantId
    $managedIdentityObjectId = (Get-AzWebApp -ResourceGroupName $resourceGroupName -Name $webAppName).identity.principalid
    
    Connect-MgGraph -TenantId $TenantId -Scopes 'Application.Read.All','AppRoleAssignment.ReadWrite.All'
    
    # Get Microsoft Graph app's service principal and app role.
    $serverApplicationName = "Microsoft Graph"
    $serverServicePrincipal = (Get-MgServicePrincipal -Filter "DisplayName eq '$serverApplicationName'")
    $serverServicePrincipalObjectId = $serverServicePrincipal.Id
    
    $appRoleId = ($serverServicePrincipal.AppRoles | Where-Object {$_.Value -eq $appRoleName }).Id
    
    # Assign the managed identity access to the app role.
    New-MgServicePrincipalAppRoleAssignment `
        -ServicePrincipalId $managedIdentityObjectId `
        -PrincipalId $managedIdentityObjectId `
        -ResourceId $serverServicePrincipalObjectId `
        -AppRoleId $appRoleId