Connect-MgGraph fails after Connect-ExchangeOnline
维护者通常 2 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 52/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- azure, powershell
- 领域
- api, authentication
调研方向
首先,在 PowerShell 7.5.2 上使用 Microsoft.Graph 2.30.0 和 ExchangeOnlineManagement 3.9.0 重现记录的命令顺序,然后将其与已知可正常工作的版本进行比较。围绕报告的 Microsoft.Identity.Client.WithLogging MissingMethodException 跟踪 Connect-ExchangeOnline 和 Connect-MgGraph;当任一命令顺序能够在不出现身份验证失败的情况下工作时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
Describe the bug
I don't know, if this is related to the ExchangeOnlineManagement module (my suspicison) or to Microsoft.Graph, but you should know; too, I guess:
I updated Microsoft.Graph from 2.29.1. to 2.30.0 yesterday and ExchangeOnlineManagement from 3.8.0 to 3.9.0. After the update I found that when I run Connect-ExchangeOnline before Connect-MgGraph, the latter fails with the following error:
Connect-MgGraph: ClientCertificateCredential authentication failed: Method not found: '!0 Microsoft.Identity.Client.BaseAbstractApplicationBuilder`1.WithLogging(Microsoft.IdentityModel.Abstractions.IIdentityLogger, Boolean)'.
When I run Connect-MgGraph first and then Connect-ExchangeOnline, it works.
Expected behavior
IMO it should not matter, which command is run first.
How to reproduce
- On Powershell 7.5.2 ...
- Install Microsoft.Graph 2.30.0
- Install ExchangeOnlineManagement 3.9.0
- First run Connect-ExchangeOnline. ( I used certificate authentication )
- Second run Connect-MgGraph. It does not matter if user or certificate authentication. I tried both
- You should get the error described above
SDK Version
2.30.0
Latest version known to work for scenario above?
2.29.1 together with ExchangeOnlineManagement 3.8.0
Known Workarounds
- First run Connect-MgGraph
- Then run Connect-ExchangeOnline
Debug output
Click to expand log
```DEBUG: ClientCertificateCredential.GetToken invoked. Scopes: [ https://graph.microsoft.com/.default ] ParentRequestId:
DEBUG: ClientCertificateCredential.GetToken was unable to retrieve an access token. Scopes: [ https://graph.microsoft.com/.default ] ParentRequestId: Exception: Azure.Identity.AuthenticationFailedException (0x80131500): ClientCertificateCredential authentication failed: Method not found: '!0 Microsoft.Identity.Client.BaseAbstractApplicationBuilder1.WithLogging(Microsoft.IdentityModel.Abstractions.IIdentityLogger, Boolean)'. ---> System.MissingMethodException (0x80131513): Method not found: '!0 Microsoft.Identity.Client.BaseAbstractApplicationBuilder1.WithLogging(Microsoft.IdentityModel.Abstractions.IIdentityLogger, Boolean)'.
Connect-MgGraph: ClientCertificateCredential authentication failed: Method not found: '!0 Microsoft.Identity.Client.BaseAbstractApplicationBuilder`1.WithLogging(Microsoft.IdentityModel.Abstractions.IIdentityLogger, Boolean)'.
</details>
### Configuration
Name Value
PSVersion 7.5.2
PSEdition Core
GitCommitId 7.5.2
OS Microsoft Windows 10.0.26100
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Architecture: x64
### Other information
_No response_
- 主要语言
- C#
- 星标
- 902
- 派生
- 233
- 平均合并
- 1 天 22 小时
- 30 天内合并 PR
- 29
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoftgraph/msgraph-sdk-powershell 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 84/100
microsoftgraph/msgraph-sdk-powershell#3752 ·
维护者通常 2 天内回复
-
status:waiting-for-triage type:bug
难度 4/5 3-5 天 新手友好度 22/100
microsoftgraph/msgraph-sdk-powershell#3822 ·
维护者通常 2 天内回复
-
status:waiting-for-triage type:bug
难度 4/5 3-5 天 新手友好度 48/100
microsoftgraph/msgraph-sdk-powershell#3819 ·
维护者通常 2 天内回复
-
Connect-MgGraph on 2.41 crashes when making a connection with cert, fixes when using 2.39 or lower未关闭status:waiting-for-triage type:bug
难度 4/5 3-5 天 新手友好度 48/100
microsoftgraph/msgraph-sdk-powershell#3816 ·
维护者通常 2 天内回复
-
status:waiting-for-triage type:feature
难度 4/5 3-5 天 新手友好度 45/100
microsoftgraph/msgraph-sdk-powershell#3806 · 3 条评论 · 3 个 reaction ·
维护者通常 2 天内回复
查看 microsoftgraph/msgraph-sdk-powershell 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
microsoft/fluentui-blazor#5427 ·
维护者通常 1 天内回复
-
area:jobads-cv BE mvp P2
难度 2/5 1-3 小时 新手友好度 62/100
klasolsson81/jobbliggaren#2099 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
0 - Backlog Bug
难度 2/5 1-3 小时 新手友好度 62/100
BrighterCommand/Brighter#4581 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 92/100
Esri/calcite-dotnet-toolkit#30 · 1 个 reaction ·