Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Import-Module Microsoft.Graph.Authentication 2.34.0 Error GetTokenAsync

Aperta
#3,479 47 commenti 7 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
csharp, powershell

Direzione di ricerca

Inizia con il modulo Microsoft.Graph.Authentication e il tipo Microsoft.Graph.PowerShell.Authentication.Core.Utilities.UserProvidedTokenCredential indicato nell’errore. Confronta gli assembly o il codice sorgente delle versioni 2.34.0 e 2.33.0 intorno a GetTokenAsync, quindi riproduci l’importazione in Windows PowerShell 5.1. Il lavoro è completato quando Microsoft.Graph.Authentication viene importato senza TypeLoadException nell’ambiente indicato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area: PowerShell 5.1 Needs: Attention :wave: type:bug
Describe the bug

Import-Module Microsoft.Graph.Authentication
Import-Module : Method 'GetTokenAsync' in type
'Microsoft.Graph.PowerShell.Authentication.Core.Utilities.UserProvidedTokenCredential' from assembly
'Microsoft.Graph.Authentication.Core, Version=2.34.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' does not
have an implementation.
At line:1 char:1

  • Import-Module Microsoft.Graph.Authentication
  •   + CategoryInfo          : NotSpecified: (:) [Import-Module], TypeLoadException
      + FullyQualifiedErrorId : System.TypeLoadException,Microsoft.PowerShell.Commands.ImportModuleCommand
    
    
Expected behavior

Import-Module Microsoft.Graph.Authentication does not throw an error

How to reproduce

Import-Module Microsoft.Graph.Authentication

SDK Version

2.34.0

Latest version known to work for scenario above?

2.33.0

Known Workarounds

No response

Debug output
Click to expand log ``` Import-Module Microsoft.Graph.Authentication -Debug VERBOSE: Loading module from path 'C:\Users\a.bohren\OneDrive - Icewolf\Dokumente\WindowsPowerShell\Modules\Microsoft.Graph.Authentication\2.34.0\Microsoft.Graph.Authentication.psd1'.

Confirm
Continue with this operation?
[Y] Yes [A] Yes to All [H] Halt Command [S] Suspend [?] Help (default is "Y"): A
VERBOSE: Cannot verify the Microsoft .NET Framework version 4.7.2 because it is not included in the list of permitted
versions.
VERBOSE: Loading 'FormatsToProcess' from path 'C:\Users\a.bohren\OneDrive -
Icewolf\Dokumente\WindowsPowerShell\Modules\Microsoft.Graph.Authentication\2.34.0\Microsoft.Graph.Authentication.format
.ps1xml'.
VERBOSE: Populating RepositorySourceLocation property for module Microsoft.Graph.Authentication.
VERBOSE: Loading module from path 'C:\Users\a.bohren\OneDrive -
Icewolf\Dokumente\WindowsPowerShell\Modules\Microsoft.Graph.Authentication\2.34.0\Microsoft.Graph.Authentication.dll'.
VERBOSE: Importing cmdlet 'Get-ModuleCmdlet'.
VERBOSE: Importing cmdlet 'Get-ScriptCmdlet'.
VERBOSE: Importing cmdlet 'Connect-MgGraph'.
VERBOSE: Importing cmdlet 'Disconnect-MgGraph'.
VERBOSE: Importing cmdlet 'Add-MgEnvironment'.
VERBOSE: Importing cmdlet 'Get-MgEnvironment'.
VERBOSE: Importing cmdlet 'Remove-MgEnvironment'.
VERBOSE: Importing cmdlet 'Set-MgEnvironment'.
VERBOSE: Importing cmdlet 'Get-MgContext'.
VERBOSE: Importing cmdlet 'Get-MgGraphOption'.
VERBOSE: Importing cmdlet 'Invoke-MgGraphRequest'.
VERBOSE: Importing cmdlet 'Set-MgGraphOption'.
VERBOSE: Importing cmdlet 'Get-MgRequestContext'.
VERBOSE: Importing cmdlet 'Set-MgRequestContext'.
VERBOSE: Importing alias 'Connect-Graph'.
VERBOSE: Importing alias 'Disconnect-Graph'.
VERBOSE: Importing alias 'Disconnect-Graph'.
VERBOSE: Importing alias 'Disconnect-Graph'.
VERBOSE: Importing alias 'Disconnect-Graph'.
VERBOSE: Importing alias 'Disconnect-Graph'.
VERBOSE: Importing alias 'Disconnect-Graph'.
VERBOSE: Importing alias 'Disconnect-Graph'.
VERBOSE: Importing alias 'Invoke-GraphRequest'.
VERBOSE: Importing alias 'Invoke-MgRestMethod'.
VERBOSE: Importing alias 'Invoke-GraphRequest'.
VERBOSE: Importing alias 'Invoke-MgRestMethod'.
VERBOSE: Importing alias 'Invoke-GraphRequest'.
VERBOSE: Importing alias 'Invoke-MgRestMethod'.
VERBOSE: Importing alias 'Invoke-GraphRequest'.
VERBOSE: Importing alias 'Invoke-MgRestMethod'.
VERBOSE: Loading module from path 'C:\Users\a.bohren\OneDrive -
Icewolf\Dokumente\WindowsPowerShell\Modules\Microsoft.Graph.Authentication\2.34.0\Microsoft.Graph.Authentication.Core.d
ll'.
Import-Module : Method 'GetTokenAsync' in type
'Microsoft.Graph.PowerShell.Authentication.Core.Utilities.UserProvidedTokenCredential' from assembly
'Microsoft.Graph.Authentication.Core, Version=2.34.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' does not
have an implementation.
At line:1 char:1

  • Import-Module Microsoft.Graph.Authentication -Debug
  •   + CategoryInfo          : NotSpecified: (:) [Import-Module], TypeLoadException
      + FullyQualifiedErrorId : System.TypeLoadException,Microsoft.PowerShell.Commands.ImportModuleCommand
    
</details>


### Configuration

$PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.26100.7462
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.26100.7462
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Windows 11 25H2
x64

### Other information

_No response_
Lingua principale
C#
Stelle
902
Fork
233
Merge medio
1g 3h
PR unite (30g)
24

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di microsoftgraph/msgraph-sdk-powershell

Tutte le issue di microsoftgraph/msgraph-sdk-powershell

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.