microsoftgraph / microsoftgraph/msgraph-sdk-python
App Registration Federated Credentials Using Custom Claim Expression Causes Internal Server Error
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 630
- フォーク
- 96
- 平均マージ
- 15時間 20分
- マージ済み PR(30日)
- 3
説明
Describe the bug
I am attempting to filter through all of my App Registrations that have Federated Credentials configured, but am getting an Internal Server Error from the API whenever a credential uses the Claim Matching Expressions functionality instead of an explicit subject value. For example, this is a problematic credential for the API:
This results in the following response data from the API which the SDK cannot handle properly as it's not valid JSON:
{
"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#applications('<application id>')/federatedIdentityCredentials",
"value":[
{
"id":"<credential id>",
"name":"debug_v2",
"issuer":"https://token.actions.githubusercontent.com"{"error":{"code":"InternalServerError","message":"The property 'subject[Nullable=False]' of type 'Edm.String' has a null value, which is not allowed.","innerError":{"date":"2025-09-17T21:05:59","request-id":"f1ffe8e1-f229-4ba1-83e6-69c64046e4a5","client-request-id":"f1ffe8e1-f229-4ba1-83e6-69c64046e4a5"}}}
You'll note that the value attribute would contain multiple other credentials (there are 3 on this app registration), but because of this error they're not visible at all. I don't think this is an issue with the SDK specifically, rather the Graph API it's using, but this seems like a reasonable place to report the issue since it's preventing SDK functionality from working properly.
Expected behavior
Claims matching expressions are supported in the JSON response for Federated Credentials
How to reproduce
GraphServiceClient(credentials=<credential>).applications.by_application_id(app_object_id).federated_identity_credentials.get()
where the app registration being queried has at least 1 federated credential using the "claims matching expression" feature.
SDK Version
1.2.0
Latest version known to work for scenario above?
No response
Known Workarounds
Haven't been able to find a way around other than finding the data manually through the portal
Debug output
Click to expand log
```</details>
### Configuration
_No response_
### Other information
_No response_
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
claims matching expression を含むアプリに対して GraphServiceClient applications.by_application_id(...).federated_identity_credentials.get() を実行して再現することから始めてください。返されたペイロードと SDK の処理を調査し、この失敗が Python クライアントで表現可能なものか、Microsoft Graph に起因するものかを判断してください。リクエストが使用不能なレスポンスを生成しなくなり、影響を受ける資格情報にアクセスでき、このシナリオに対するカバレッジが、リポジトリの変更が適切な場合に追加されていれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- api
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100