Skip to content

Conversation

Copy link

Copilot AI commented Nov 21, 2025

Azure CLI 2.73.0+ removed the --include-classic-administrators parameter, causing the script to fail. Reference: Azure/azure-cli#27199

Changes

Line 210 - Remove deprecated parameter:

# Before
$adminroles = (az role assignment list --include-classic-administrators) | ConvertFrom-Json

# After  
$adminroles = (az role assignment list) | ConvertFrom-Json

Line 216 - Align fallback role check with primary check:

# Before
if (($($role.scope) -eq "/subscriptions/$($aicfg.SubscriptionId)") -and ($role.roleDefinitionName -match 'Administrator'))

# After
if (($($role.scope) -eq "/subscriptions/$($aicfg.SubscriptionId)") -and ($role.roleDefinitionName -match 'Owner'))

Lines 208-209 - Update comments and messages to reflect RBAC-only behavior.

The fallback check preserves CSP subscription workaround (issue #15261) while using consistent role criteria.

Original prompt

This section details on the original issue you should resolve

<issue_title>[BUG] AksEdgeAzureSetup.ps1 should remove --include-classic-administrators</issue_title>
<issue_description>In tools/scripts/AksEdgeAzureSetup/AksEdgeAzureSetup.ps1 line 204 reads $adminroles = (az role assignment list --include-classic-administrators) | ConvertFrom-Json. Azure CLI dropped --include-classic-administrators parameter in version 2.73.0 (May 20, 2025). See: Azure/azure-cli#27199. This results in an error being thrown if a more recent version of Azure CLI has been installed. </issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Fix bug by removing --include-classic-administrators from script Remove deprecated --include-classic-administrators from Azure CLI command Nov 21, 2025
Copilot AI requested a review from seanyen November 21, 2025 00:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] AksEdgeAzureSetup.ps1 should remove --include-classic-administrators

2 participants