microsoftgraph / microsoftgraph/msgraph-metadata

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

Open
#502 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

ToTriage
Dominant language
XSLT
Stars
166
Forks
55
Avg merge
16h 12m
Merged PRs (30d)
14

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the metadata entry for /identityGovernance/accessReviews/definitions/{accessReviewScheduleDefinition-id}/instances/{accessReviewInstance-id}/decisions/$count and the generated Get-MgIdentityGovernanceAccessReviewDefinitionInstanceDecisionCount command. Compare it with the reported 404 response and the analogous contacted-reviewer count command. Done means the unsupported endpoint is no longer represented in the metadata or generated command output.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
api, backend-api-design
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.