Remove-MgServicePrincipalTokenLifetimePolicyByRef is not using the correct underlying HTTP Graph endpoint
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 68/100
調査の方向性
Remove-MgServicePrincipalTokenLifetimePolicyByRef cmdlet のエントリポイントから開始し、生成された DELETE URI を、issue にリンクされている Microsoft Graph token lifetime policy のドキュメントと比較します。ポリシー ID が /$ref の前のパスに配置されていることを確認し、利用可能であれば関連する cmdlet テストまたはリクエスト生成テストを実行します。コマンドがドキュメントに記載されたエンドポイントに送信すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
I am using Microsoft.Graph version 2.39.0 on PowerShell 7.
The commandlet Remove-MgServicePrincipalTokenLifetimePolicyByRef is not sending out the correct MS Graph endpoint leading to error
PS C:\Users\bachoang> Remove-MgServicePrincipalTokenLifetimePolicyByRef -ServicePrincipalId xyz -Id abc -Debug
DEBUG: [CmdletBeginProcessing]: - Remove-MgServicePrincipalTokenLifetimePolicyByRef begin processing with parameterSet 'Delete'.
DEBUG: [Authentication]: - AuthType: 'Delegated', TokenCredentialType: 'InteractiveBrowser', ContextScope: 'CurrentUser', AppName: 'Microsoft Graph Command Line Tools'.
DEBUG: [Authentication]: - Scopes: [Application.Read.All, Application.ReadWrite.All, AppRoleAssignment.ReadWrite.All, AuditLog.Read.All, DelegatedPermissionGrant.ReadWrite.All, Directory.AccessAsUser.All, Directory.Read.All, Directory.ReadWrite.All, GroupMember.Read.All, openid, Policy.Read.All, Policy.ReadWrite.ApplicationConfiguration, profile, User.Read, UserAuthenticationMethod.ReadWrite.All, email].
DEBUG: ============================ HTTP REQUEST ============================
HTTP Method:
DELETE
Absolute Uri:
https://graph.microsoft.com/v1.0/servicePrincipals/xyz/tokenLifetimePolicies/$ref?@id=abc
Headers:
FeatureFlag : 00000003
Cache-Control : no-store, no-cache
User-Agent : Mozilla/5.0,(Windows NT 10.0; Microsoft Windows 10.0.26200; en-US),PowerShell/7.6.5
SdkVersion : graph-powershell/2.38.0
client-request-id : 2671f48e-a8bf-4694-80a2-b3f3997eb73f
Accept-Encoding : gzip,deflate
Body:
DEBUG: ============================ HTTP RESPONSE ============================
Status Code:
BadRequest
Headers:
Date : Tue, 18 Aug 2026 22:53:04 GMT
Transfer-Encoding : chunked
Connection : keep-alive
Vary : Accept-Encoding
Strict-Transport-Security : max-age=31536000
request-id : 0981e110-77aa-4c52-8fba-8ad957a58dd2
client-request-id : 2671f48e-a8bf-4694-80a2-b3f3997eb73f
x-ms-ags-diagnostic : {"ServerInfo":{"DataCenter":"South Central US","Slice":"E","Ring":"5","ScaleUnit":"005","RoleInstance":"SN4PEPF00000013"}}
The MS Graph URL the commandlet https://graph.microsoft.com/v1.0/servicePrincipals/xyz/tokenLifetimePolicies/$ref?@id=abc sends out is wrong.
The correct MS Graph URL is https://graph.microsoft.com/v1.0/servicePrincipals/xyz/tokenLifetimePolicies/abc/$ref per https://learn.microsoft.com/en-us/entra/identity-platform/configure-token-lifetimes?source=recommendations#create-a-policy-and-assign-it-to-a-service-principal (step 4)
Expected behavior
It should make this correct request:
DELETE https://graph.microsoft.com/v1.0/servicePrincipals/xyz/tokenLifetimePolicies/abc/$re
How to reproduce
see above
SDK Version
No response
Latest version known to work for scenario above?
No response
Known Workarounds
No response
Debug output
Click to expand log
```</details>
### Configuration
_No response_
### Other information
_No response_
- 主要言語
- C#
- スター
- 902
- フォーク
- 233
- 平均マージ
- 1日 22時間
- マージ済み PR(30日)
- 29
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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 日以内に返信
-
Microsoft.Graph.Authentication dependency Microsoft.Graph.Authentication.Loader.dll is unsignedオープン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 件 ·
メンテナーはふだん 2 日以内に返信
microsoftgraph/msgraph-sdk-powershell の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
Esri/calcite-dotnet-toolkit#30 · リアクション 1 件 ·
-
VideoViewer: rotated (portrait phone) videos shown sideways when system decimal separator is a commaオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
Volodymyr-Petrunin/Bankomaten#45 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
thekid/inotify-win#45 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
AvaloniaUI/Avalonia#22420 ·
メンテナーはふだん 1 日以内に返信