Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

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

未关闭
#3,816 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
48/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
csharp, powershell

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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_
主要语言
C#
星标
902
派生
233
平均合并
1 天 20 小时
30 天内合并 PR
30

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

microsoftgraph/msgraph-sdk-powershell 的其他 Issue

查看 microsoftgraph/msgraph-sdk-powershell 的全部 Issue

相似的 Issue

更多 C# Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。