Skip to content

Get-MgBetaIdentityGovernanceAccessReviewDefinition serialization issue with parameter scope #2991

@William-Francillette

Description

@William-Francillette

Describe the bug

the parameter scope retrieve the value Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphAccessReviewScope instead of the scope details

Expected behavior

should retrieve an object as retrieved in the debug trace

  "scope": {
    "@odata.type": "#microsoft.graph.accessReviewQueryScope",
    "query": "/beta/identityGovernance/entitlementManagement/accessPackageAssignments?$filter=(accessPackageId eq '<packageid>' and assignmentPolicyId eq '<policyid>' and catalogId eq '<catalogid>')",
    "queryType": "MicrosoftGraph",
    "queryRoot": null
  },

How to reproduce

(Get-MgBetaIdentityGovernanceAccessReviewDefinition -AccessReviewScheduleDefinitionId < id >).scope

SDK Version

2.24.0

Latest version known to work for scenario above?

No response

Known Workarounds

using invoke-mggraphrequest

Debug output

Click to expand log ``` DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://graph.microsoft.com/beta/identityGovernance/accessReviews/definitions/

Headers:
FeatureFlag : 00000043
Cache-Control : no-store, no-cache
User-Agent : Mozilla/5.0,(Windows NT 10.0; Microsoft Windows 10.0.22631; en-GB),PowerShell/7.4.5
Accept-Encoding : gzip
SdkVersion : graph-powershell-beta/2.24.0
client-request-id : 867b2885-b1ae-4cef-ba04-1b64bc600619

Body:

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

Status Code:
OK

Headers:
Vary : Accept-Encoding
Strict-Transport-Security : max-age=31536000
request-id : af126007-4c9d-415e-9ace-9a597947ba89
client-request-id : 867b2885-b1ae-4cef-ba04-1b64bc600619
x-ms-ags-diagnostic : {"ServerInfo":{"DataCenter":"UK South","Slice":"E","Ring":"5","ScaleUnit":"000","RoleInstance":"LN2PEPF000114C9"}}
Link : https://developer.microsoft-tst.com/en-us/graph/changes?$filterby=beta,PrivatePreview:customData&from=2021-06-01&to=2021-07-01;rel="deprecation";type="text/html",https://developer.microsoft-tst.com/en-us/graph/changes?$filterby=beta,PrivatePreview:customData&from=2021-06-01&to=2021-07-01;rel="deprecation";type="text/html",https://developer.microsoft-tst.com/en-us/graph/changes?$filterby=beta,PrivatePreview:customData&from=2021-06-01&to=2021-07-01;rel="deprecation";type="text/html"
deprecation : Thu, 03 Jun 2021 23:59:59 GMT
sunset : Sat, 03 Jun 2023 23:59:59 GMT
odata-version : 4.0
Date : Tue, 08 Oct 2024 15:38:02 GMT

Body:
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#identityGovernance/accessReviews/definitions/$entity",
"id": "",
"displayName": "package - DSC - policy with access review",
"createdDateTime": "2022-11-22T18:55:08.5175414Z",
"lastModifiedDateTime": "2022-11-23T00:00:41.0384578Z",
"status": "InProgress",
"descriptionForAdmins": "",
"descriptionForReviewers": "",
"customDataProvider": null,
"customData": null,
"createdBy": {
"id": "",
"displayName": "",
"type": null,
"userPrincipalName": ""
},
"scope": {
"@odata.type": "#microsoft.graph.accessReviewQueryScope",
"query": "/beta/identityGovernance/entitlementManagement/accessPackageAssignments?$filter=(accessPackageId eq '< redacted >' and assignmentPolicyId eq '< redacted >' and catalogId eq '< redacted >')",
"queryType": "MicrosoftGraph",
"queryRoot": null
},
"instanceEnumerationScope": {
"@odata.type": "#microsoft.graph.accessReviewQueryScope",
"query": "/beta/identityGovernance/entitlementManagement/accessPackageAssignmentPolicies/)",
"queryType": "MicrosoftGraph",
"queryRoot": null
},
"reviewers": [
{
"query": "/v1.0/users/",
"queryType": "MicrosoftGraph",
"queryRoot": null
}
],
"backupReviewers": [],
"fallbackReviewers": [],
"settings": {
"mailNotificationsEnabled": true,
"reminderNotificationsEnabled": true,
"justificationRequiredOnApproval": true,
"defaultDecisionEnabled": true,
"defaultDecision": "Deny",
"instanceDurationInDays": 25,
"autoApplyDecisionsEnabled": true,
"recommendationsEnabled": true,
"recommendationLookBackDuration": null,
"decisionHistoriesForReviewersEnabled": false,
"recurrence": {
"pattern": {
"type": "absoluteMonthly",
"interval": 3,
"month": 0,
"dayOfMonth": 0,
"daysOfWeek": [],
"firstDayOfWeek": "sunday",
"index": "first"
},
"range": {
"type": "noEnd",
"numberOfOccurrences": 0,
"recurrenceTimeZone": null,
"startDate": "2022-11-23",
"endDate": "9999-12-31"
}
},
"applyActions": [],
"recommendationInsightSettings": []
},
"stageSettings": [],
"additionalNotificationRecipients": []
}

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

</details>


### Configuration

_No response_

### Other information

_No response_

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions