Open spaffhazz opened 1 month ago
Got this error as well on Get-AADIntAccessTokenForAzureCoreManagement -SaveToCache
command
@jeh0753 were you able to resolve the issue on your end?
I have the same issue with Version 0.9.3 and 0.9.4, this includes the following commands:
Get-AADIntAccessTokenForAADGraph -Credentials $cred
Get-AADIntAccessTokenForAADGraph -Credentials $cred -SaveToCache
Get-AADIntAccessTokenForAADGraph -Credentials $cred_a -SaveToCache -OTPSecretKey $totp_a
Get-AADIntAccessTokenForAADGraph -Credentials $cred_a -SaveToCache -OTPSecretKey $totp_a2
Get-AADIntAccessTokenForMSGraph -Credentials $cred
Get-AADIntAccessTokenForMSGraph -Credentials $cred -SaveToCache
Get-AADIntAccessTokenForMSGraph -Credentials $cred_a -SaveToCache -OTPSecretKey $totp_a
Get-AADIntAccessTokenForMSGraph -Credentials $cred -SaveToMgCache # just with 0.9.4 possible
Workaround: Use PowerShell ISE instead of PowerShell in Visual Studio Code
Works:
$PSVersionTable
Name Value
---- -----
PSVersion 5.1.22621.3958
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.22621.3958
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Does not work:
$PSVersionTable
Name Value
---- -----
PSVersion 7.4.4
PSEdition Core
GitCommitId 7.4.4
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
May related issue: Fix WebCmdlets when -Body is specified but ContentType is not
https://github.com/PowerShell/PowerShell/pull/24145 https://github.com/PowerShell/PowerShell/pull/23952
Tried fix: Upgrade to PowerShell 7.4.5
https://github.com/PowerShell/PowerShell/releases/tag/v7.4.5
Result: Upgrade did not fix the issue
I'm getting this error whenever I try to get access tokens. Not sure how to fix this. Tried updating AADInternals but it didnt help and I'm on the latest one right now.