msgraph-sdk-powershell icon indicating copy to clipboard operation
msgraph-sdk-powershell copied to clipboard

Msgraph and Az module are not compatible

Open i5513 opened this issue 1 year ago • 0 comments

I can see 4 issues about this question, but all are closed

This is from the last comment (as today) of #2284:

          > It appears to be related to the PowerShell extension for VSCode. Kill the terminal and launch a fresh `pwsh` terminal and all is good.

Not here, I am runing powershell 5.1, I have uninstalled vscode-powershell just for test:

PS C:\> import-module Microsoft.Graph.Authentication
PS C:\ [1,78s]> Connect-AzAccount
Please select the account you want to login with.

ADVERTENCIA: Unable to acquire token for tenant 'organizations' with error 'Método no encontrado: 'System.Threading.Tasks.Task`1<Azure.Identity.AuthenticationRecord>
Azure.Identity.InteractiveBrowserCredential.AuthenticateAsync(Azure.Core.TokenRequestContext, System.Threading.CancellationToken)'.'
Connect-AzAccount : Método no encontrado: 'System.Threading.Tasks.Task`1<Azure.Identity.AuthenticationRecord> Azure.Identity.InteractiveBrowserCredential.AuthenticateAsync(Azure.Core.TokenRequestContext,
System.Threading.CancellationToken)'.

PS C:\ [9,34s]> get-module -ListAvailable Az.Accounts,Microsoft.Graph.Authentication


    Directorio: C:\Program Files\WindowsPowerShell\Modules


ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Script     3.0.4      Az.Accounts                         {Disable-AzDataCollection, Disable-AzContextAutosave, Enable-AzDataCollection, Enable-AzContextAutosave...}
Script     2.24.0     Microsoft.Graph.Authentication      {Connect-MgGraph, Disconnect-MgGraph, Get-MgContext, Invoke-MgGraphRequest...}

Originally posted by @i5513 in https://github.com/microsoftgraph/msgraph-sdk-powershell/issues/2284#issuecomment-2418555553

For the moment We will use separated Az-Module based script inside our msgraph based scripts.

i5513 avatar Oct 17 '24 06:10 i5513