Non-existing/functional Update commandlets
Describe the bug The SDK contains non functional commandlets, not supported by the graph. According to the graph documentation privilegedAccessGroupAssignmentSchedule only supports list and get actions. The SDK also promises Update-MgIdentityGovernancePrivilegedAccessGroupAssignmentSchedule (patch) but it always fails.
To Reproduce $group = "<GUID>" $t = Get-MgIdentityGovernancePrivilegedAccessGroupAssignmentSchedule -Filter "groupId eq '$group'"
#GET works Get-MgIdentityGovernancePrivilegedAccessGroupAssignmentSchedule -PrivilegedAccessGroupAssignmentScheduleId $t[0].id
#PATCH fails (BodyParameter removed for brevity) Update-MgIdentityGovernancePrivilegedAccessGroupAssignmentSchedule -PrivilegedAccessGroupAssignmentScheduleId $t[0].id
Expected behavior Non-functional commandlets should not be published/visible
Debug Output Update-MgIdentityGovernancePrivilegedAccessGroupAssignmentSchedule_Update: {"message":"No HTTP resource was found that matches the request URI 'https://api.azrbac.mspim.azure.com/api/v3/privilegedAccessGroupAssignmentSchedules('GUID1_member_GUID2')?'."}
Status: 404 (NotFound) ErrorCode: UnknownError Module Version
Please run
Get-Module Microsoft.Graph*after cmdlet execution and paste the output below. If a module cannot be installed or imported, please runGet-Module -ListAvailableand paste the output.
Environment Data PS v7.4.0 SDK v2.11.1
Thank you @bartvermeersch for noticing and reporting this issue. This is indeed a cmdlet overgeneration issue.
Hi @bartvermeersch ,
I see that the metadata does support both UPDATE and DELETE methods, could you please try in your environment again? Any change?
No change (using v2.19.0 )
DEBUG: ============================ HTTP REQUEST ============================
HTTP Method: PATCH
Absolute Uri: https://graph.microsoft.com/v1.0/identityGovernance/privilegedAccess/group/assignmentScheduleRequests/redacted
Headers: FeatureFlag : 00000043 Cache-Control : no-store, no-cache User-Agent : Mozilla/5.0,(Windows NT 10.0; Microsoft Windows 10.0.22631; en-BE),PowerShell/7.4.2 Accept-Encoding : gzip SdkVersion : graph-powershell/2.19.0 client-request-id : 89f4b93a-90d4-4aa6-b7e8-655e1fa3c55b
Body: { "justification": "Update expiration active assignment.", "scheduleInfo": { "expiration": { "endDateTime": "2025-03-01T00:00:00Z", "type": "afterDateTime" } } }
DEBUG: ============================ HTTP RESPONSE ============================
Status Code: NotFound
Headers: Cache-Control : private Vary : Accept-Encoding Strict-Transport-Security : max-age=31536000 request-id : 1f7f2b5e-158e-4bee-9518-4517702e6a60 client-request-id : 89f4b93a-90d4-4aa6-b7e8-655e1fa3c55b x-ms-ags-diagnostic : {"ServerInfo":{"DataCenter":"West Europe","Slice":"E","Ring":"5","ScaleUnit":"002","RoleInstance":"AM2PEPF0000BE06"}} Date : Wed, 05 Jun 2024 12:12:26 GMT
Body: { "error": { "code": "UnknownError", "message": "{"message":"No HTTP resource was found that matches the request URI 'https://api.azrbac.mspim.azure.com/api/v3/privilegedAccessGroupAssignmentScheduleRequests('redacted')?'."}", "innerError": { "date": "2024-06-05T12:12:26", "request-id": "1f7f2b5e-158e-4bee-9518-4517702e6a60", "client-request-id": "89f4b93a-90d4-4aa6-b7e8-655e1fa3c55b" } } }
Update-MgIdentityGovernancePrivilegedAccessGroupAssignmentScheduleRequest_Update: {"message":"No HTTP resource was found that matches the request URI 'https://api.azrbac.mspim.azure.com/api/v3/privilegedAccessGroupAssignmentScheduleRequests('redacted')?'."}
Status: 404 (NotFound) ErrorCode: UnknownError Date: 2024-06-05T12:12:26
Headers: Cache-Control : private Vary : Accept-Encoding Strict-Transport-Security : max-age=31536000 request-id : 1f7f2b5e-158e-4bee-9518-4517702e6a60 client-request-id : 89f4b93a-90d4-4aa6-b7e8-655e1fa3c55b x-ms-ags-diagnostic : {"ServerInfo":{"DataCenter":"West Europe","Slice":"E","Ring":"5","ScaleUnit":"002","RoleInstance":"AM2PEPF0000BE06"}} Date : Wed, 05 Jun 2024 12:12:26 GMT
DEBUG: [CmdletEndProcessing]: - Update-MgIdentityGovernancePrivilegedAccessGroupAssignmentScheduleRequest end processing.