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 detailed PowerShell examples for obtaining authorization tokens, while omitting equivalent Linux or cross-platform scripting examples (e.g., Bash, curl, Python). The PowerShell MSAL example is given more prominence and detail than the Azure CLI example, and there are no Linux-native command-line or scripting alternatives shown. This may hinder Linux users or those working in cross-platform environments.
Recommendations:
  • Add equivalent Linux/Bash/curl examples for obtaining OAuth tokens, such as using curl with the Microsoft identity platform endpoints.
  • Provide Python or other cross-platform scripting examples using MSAL libraries.
  • Ensure that Azure CLI examples are as detailed as the PowerShell examples, and clarify that Azure CLI is cross-platform.
  • When listing command-line options, present cross-platform tools (e.g., Azure CLI, REST with curl) before or alongside Windows-specific tools like PowerShell.
  • Explicitly mention that the PowerShell examples are primarily for Windows users, and provide guidance for Linux/macOS users.
GitHub Create pull request

Scan History

Date Scan ID Status Bias Status
2025-08-17 00:01 #83 in_progress ✅ Clean
2025-07-13 21:37 #48 completed ❌ Biased
2025-07-12 23:44 #41 in_progress ❌ Biased
2025-07-09 13:09 #3 cancelled ✅ Clean
2025-07-08 04:23 #2 cancelled ❌ Biased

Flagged Code Snippets

$clientId = '<app_id>' $tenantId = '<tenant_id>' $authority = "https://login.microsoftonline.com/$tenantId/v2.0" $Scope = 'https://api.adu.microsoft.com/user_impersonation' Get-MsalToken -ClientId $clientId -TenantId $tenantId -Authority $authority -Scopes $Scope
$clientId = '<app_id>' $tenantId = '<tenant_id>' $authority = "https://login.microsoftonline.com/$tenantId/v2.0" $Scope = 'https://api.adu.microsoft.com/user_impersonation' Get-MsalToken -ClientId $clientId -TenantId $tenantId -Authority $authority -Scopes $Scope
$clientId = '<app_id>’ $tenantId = '<tenant_id>’ $authority = "https://login.microsoftonline.com/$tenantId/v2.0" $Scope = 'https://api.adu.microsoft.com/user_impersonation' Get-MsalToken -ClientId $clientId -TenantId $tenantId -Authority $authority -Scopes $Scope -Interactive -DeviceCode
$clientId = '<app_id>’ $tenantId = '<tenant_id>’ $authority = "https://login.microsoftonline.com/$tenantId/v2.0" $Scope = 'https://api.adu.microsoft.com/user_impersonation' Get-MsalToken -ClientId $clientId -TenantId $tenantId -Authority $authority -Scopes $Scope -Interactive -DeviceCode
$clientId = '<app_id>’ $tenantId = '<tenant_id>’ $cert = '<client_certificate>' $authority = "https://login.microsoftonline.com/$tenantId/v2.0" $Scope = 'https://api.adu.microsoft.com/.default' Get-MsalToken -ClientId $clientId -TenantId $tenantId -Authority $authority -Scopes $Scope -ClientCertificate $cert
$clientId = '<app_id>’ $tenantId = '<tenant_id>’ $cert = '<client_certificate>' $authority = "https://login.microsoftonline.com/$tenantId/v2.0" $Scope = 'https://api.adu.microsoft.com/.default' Get-MsalToken -ClientId $clientId -TenantId $tenantId -Authority $authority -Scopes $Scope -ClientCertificate $cert