Create AccessPackageAssignmentRequest graph API gives error - add user

Shweta Shukla 0 Reputation points Microsoft Employee
2024-08-20T17:03:58.1933333+00:00

Hi

Endpoint :- https://graph.microsoft.com/v1.0/identityGovernance/entitlementManagement/assignmentRequests

Method:- Post

Payload :-

{

"@odata.type": "#microsoft.graph.accessPackageAssignmentRequest",

"requestType": "UserAdd",

"accessPackageAssignment": {

    "target": {

        "email": "user@validconnectedOrgId.com"

    },

    "assignmentPolicyId": "policyid",

    "accessPackageId": "packageid"

},

"justification": "Test case1"

}

Error :- {

"error": {

"code": "ArgumentNullException",

"message": "Value cannot be null.\r\nParameter name: Grant",

User token snapshot :- User's image

Thanks

Shweta

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
21,300 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. James Hamil 24,136 Reputation points Microsoft Employee
    2024-08-26T18:30:40.57+00:00

    Hi @Shweta Shukla , based on the payload you provided, it seems that you are missing a comma after the "justification" field, which could be causing the issue.

    Please let me know if you have any questions and I can help you further.

    If this answer helps you please mark "Accept Answer" so other users can reference it.

    Thank you,

    James

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.