Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

Connect-MgGraph on 2.41 crashes when making a connection with cert, fixes when using 2.39 or lower

Aberta
#3,816 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
48/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
csharp, powershell
Domínio
api, authentication

Direção de pesquisa

Start by reproducing the reported Connect-MgGraph certificate-authentication failure with Graph.Authentication 2.41.1, then compare it with 2.39, which the report says works. Investigate the RefreshCacheAsync implementation mismatch named in the exception; done means the certificate connection succeeds on 2.41.1 without downgrading.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

status:waiting-for-triage type:bug
Describe the bug

When using the following code with version 2.39 (or lower) of Graph.authentication, it will work.
Connect-MgGraph -ClientId $ClientID
-TenantId $TenantID -Certificate $cert
-NoWelcome

fresh device with 2.4.1 will crash with this error. work around is to install 2.39 or lower and use this graph.authentication.

Method 'RefreshCacheAsync' in type 'Microsoft.Graph.PowerShell.Authentication.Core.TokenCache.InMemoryTokenCacheOptions' from assembly 'Microsoft.Graph.Authentication.Core, Version=2.41.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' does not have an implementation.

Expected behavior

I expect it to connect and work.

How to reproduce

Create a certificate and load it. This is used by an api registration with only https://graph.microsoft.com/DeviceManagementServiceConfig.ReadWrite.All

Connect-MgGraph -ClientId $ClientID
-TenantId $TenantID -Certificate $cert
-NoWelcome

upon using this connection command it will crash

SDK Version

No response

Latest version known to work for scenario above?

No response

Known Workarounds

downgrade and load Graph.authentication 2.39 or lower

Debug output
Click to expand log ```
</details>


### Configuration

_No response_

### Other information

_No response_
Linguagem predominante
C#
Estrelas
902
Forks
233
Merge médio
1d 20h
PRs com merge (30d)
30

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de microsoftgraph/msgraph-sdk-powershell

Todas as issues de microsoftgraph/msgraph-sdk-powershell

Issues semelhantes

Mais issues de C#

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.