microsoftgraph / msgraph-metadata

Microsoft Graph metadata captured and used for generating client library code files.
https://graph.microsoft.com
MIT License
104 stars 31 forks source link

Unsupported and undocumented ``/identityGovernance/accessReviews/definitions/{accessReviewScheduleDefinition-id}/instances/{accessReviewInstance-id}/decisions/$count`` needs to be removed #502

Open insomniacc opened 11 months ago

insomniacc commented 11 months ago

Describe the bug The following commands don't seem to function: Get-MgIdentityGovernanceAccessReviewDefinitionInstanceContactedReviewerCount Get-MgIdentityGovernanceAccessReviewDefinitionInstanceDecisionCount

I've tested both of these and in each case only ever get 404 (NotFound) responses. There's also no examples or any real detail on the documentation for these commands.

To Reproduce

Connect-MgGraph -TenantId $TenantID -ClientSecretCredential $ClientCredential -NoWelcome -ErrorAction Stop
$AccessReview = Get-MgIdentityGovernanceAccessReviewDefinition -AccessReviewScheduleDefinitionId "<access review ID>"
$Instance = Get-MgIdentityGovernanceAccessReviewDefinitionInstance -AccessReviewScheduleDefinitionId $AccessReview.id | select -first 1
Get-MgIdentityGovernanceAccessReviewDefinitionInstanceDecisionCount -AccessReviewScheduleDefinitionId $AccessReview.id -AccessReviewInstanceId $Instance.id -debug 

Expected behavior

A clear and concise description of what you expected to happen.

Debug Output

> Get-MgIdentityGovernanceAccessReviewDefinitionInstanceDecisionCount -AccessReviewScheduleDefinitionId $AccessReview.id -AccessReviewInstanceId $Instance.id -debug
DEBUG: [CmdletBeginProcessing]: - Get-MgIdentityGovernanceAccessReviewDefinitionInstanceDecisionCount begin processing with parameterSet 'Get'.
DEBUG: [Authentication]: - AuthType: 'AppOnly', TokenCredentialType: 'ClientSecret', ContextScope: 'Process', AppName: '90 Day Access Review'.
DEBUG: [Authentication]: - Scopes: [AccessReview.ReadWrite.Membership, Group.Read.All, AccessReview.ReadWrite.All, Group.Create, User.Read.All, Mail.Read, AccessReview.Read.All, Mail.Send, GroupMember.ReadWrite.All].
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://graph.microsoft.com/v1.0/identityGovernance/accessReviews/definitions/<AccessReviewID>/instances/<InstanceID>/decisions/$count

Headers:
FeatureFlag                   : 00000043
Cache-Control                 : no-store, no-cache
User-Agent                    : Mozilla/5.0,(Windows NT 10.0; Microsoft Windows 10.0.19045; en-GB),PowerShell/7.2.16
Accept-Encoding               : gzip
SdkVersion                    : graph-powershell/2.9.0
client-request-id             : <ClientrequestID>

Body:

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
NotFound

Headers:
Transfer-Encoding             : chunked
Vary                          : Accept-Encoding
Strict-Transport-Security     : max-age=31536000
request-id                    : <RequestID>
client-request-id             : <ClientRequestID>
x-ms-ags-diagnostic           : {"ServerInfo":{"DataCenter":"UK South","Slice":"E","Ring":"3","ScaleUnit":"000","RoleInstance":"<RoleInstance>"}}
Date                          : Tue, 14 Nov 2023 16:19:16 GMT

Body:
{
  "error": {
    "code": "UnknownError",
    "message": "{\"Message\":\"No HTTP resource was found that matches the request URI 'https://api.accessreviews.identitygovernance.azure.com/accessReviews/v2.0/definitions('<AccessReviewID>')/instances('<InstanceID>')/decisions/$count?ring=2'.\"}",
    "innerError": {
      "date": "2023-11-14T16:19:16",
      "request-id": "<RequestID>",
      "client-request-id": "<ClientRequestID>"
    }
  }
}

Get-MgIdentityGovernanceAccessReviewDefinitionInstanceDecisionCount_Get: {"Message":"No HTTP resource was found that matches the request URI 'https://api.accessreviews.identitygovernance.azure.com/accessReviews/v2.0/definitions('<AccessReviewID>')/instances('<InstanceID>')/decisions/$count?ring=2'."}
Status: 404 (NotFound)
ErrorCode: UnknownError
Date: 2023-11-14T16:19:16
Headers:
Transfer-Encoding             : chunked
Vary                          : Accept-Encoding
Strict-Transport-Security     : max-age=31536000
request-id                    : <RequestID>
client-request-id             : <ClientRequestID>
x-ms-ags-diagnostic           : {"ServerInfo":{"DataCenter":"UK South","Slice":"E","Ring":"3","ScaleUnit":"000","RoleInstance":"<RoleInstance>"}}
Date                          : Tue, 14 Nov 2023 16:19:16 GMT

DEBUG: [CmdletEndProcessing]: - Get-MgIdentityGovernanceAccessReviewDefinitionInstanceDecisionCount end processing.

Module Version 2.9.0

Environment Data PSVersion 7.2.16

timayabi2020 commented 11 months ago

image