Azure / Azure/azure-powershell
Az Accounts does not repect $env:AZURE_IDENTITY_DISABLE_CP1
- Dominant language
- C#
- Stars
- 4.8k
- Forks
- 4.3k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 51
Description
### Description
AZURE_IDENTITY_DISABLE_CP1 should disable the client-side CAE-capability as per [Azure.Identity
/CHANGELOG.md](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/CHANGELOG.md#140-2021-05-12) and #16766 . However, CAE continues to be enabled even if the environment variable is set to true.
### Issue script & Debug output
```PowerShell
[Environment]::SetEnvironmentVariable("AZURE_IDENTITY_DISABLE_CP1", "true", "User")
Disconnect-AzAccount
Connect-AzAccount -Tenant $TenantId
(Get-JwtPayload (Get-AzAccessToken -ResourceTypeName MSGraph).Token | ConvertFrom-Json).xms_cc
CP1
```
### Environment data
```PowerShell
$PSVersionTable
Name Value
---- -----
PSVersion 7.4.1
PSEdition Core
GitCommitId 7.4.1
OS Microsoft Windows 10.0.22631
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
```
### Module versions
```PowerShell
Get-Module Az*
ModuleType Version PreRelease Name ExportedCommands
---------- ------- ---------- ---- ----------------
Script 2.16.0 Az.Accounts {Add-AzEnvironment, Clear-AzConfig, Clear-AzContext, Clear-AzDefault…}
Script 0.13.0 Az.ResourceGraph {Search-AzGraph, Get-AzResourceGraphQuery, New-AzResourceGraphQuery, Remove-AzResourceGraphQuery…}
Script 6.16.0 Az.Resources {Export-AzResourceGroup, Export-AzTemplateSpec, Get-AzDenyAssignment, Get-AzDeployment…}
```
### Error output
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.