-
-
Notifications
You must be signed in to change notification settings - Fork 11
Description
Verified issue does not already exist?
I have searched and found no existing issue
What error did you receive?
WARNING: Unable to acquire token for tenant 'organizations' with error 'Method not found: 'Void Azure.Core.TokenRequestContext..ctor(System.String[], System.String, System.String, System.String, Boolean, Boolean, System.String, System.Uri, System.String)'.'
Connect-AzAccount: Method not found: 'Void Azure.Core.TokenRequestContext..ctor(System.String[], System.String, System.String, System.String, Boolean, Boolean, System.String, System.Uri, System.String)'.
Steps to Reproduce
Connect-AzAccountPlease confirm that you are running the most recent version of dbatools
2.7.21
Other details or mentions
Uninstalling dbatools and opening a fresh terminal causes the command to work.
Connect-AzAccount failure case:
The Azure.Core version that gets loaded when dbatools is present is 1.41.0.0 from location:
C:\Users\username\Documents\PowerShell\Modules\dbatools.library\2025.12.28\core\lib\Azure.Core.dll
Connect-AzAccount success case:
The Azure.Core version that gets loaded when dbatools is NOT present is 1.50.0.0 from location:
C:\Users\username\Documents\PowerShell\Modules\Az.Accounts\5.3.2\lib\netstandard2.0\Azure.Core.dll
What PowerShell host was used when producing this error
PowerShell Core (pwsh.exe)
PowerShell Host Version
Name Value
PSVersion 7.5.4
PSEdition Core
GitCommitId 7.5.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
SQL Server Edition and Build number
N/A
.NET Framework Version
.NET 9.0.10