Entitlement Management | Provide Mandatory Answers Access Package Request via API

timdlyncme 1 Reputation point
2022-11-02T17:55:32.177+00:00

I have an access package that has a policy containing required questions. How would I pass in the required information? Nowhere in the documentation examples show how to pass answers/justification.

The API Documentation - https://learn.microsoft.com/en-us/graph/api/entitlementmanagement-post-assignmentrequests?view=graph-rest-1.0&tabs=http#example-1-admin-requests-a-direct-assignment-for-a-user-already-in-the-directory

thanks.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,564 questions
Microsoft Entra
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,444 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Akshay-MSFT 16,026 Reputation points Microsoft Employee
    2022-12-19T13:53:58.017+00:00

    Hello @timdlyncme ,

    The questions (accessPackageQuestion resource type) could be added in accessPackageAssignmentPolicy while defining the body for Create accessPackage

    {
    "@odata.type": "#microsoft.graph.accessPackageAssignmentPolicy",
    "id": "String (identifier)",
    "accessPackageId": "String",
    "displayName": "String",
    "description": "String",
    "canExtend": "Boolean",
    "durationInDays": "Integer",
    "expirationDateTime": "String (timestamp)",
    "createdBy": "String",
    "createdDateTime": "String (timestamp)",
    "modifiedBy": "String",
    "modifiedDateTime": "String (timestamp)",
    "questions": [
    {

    "@odata.type": "microsoft.graph.accessPackageQuestion"**
    "id": "String (identifier)",
    "isRequired": "Boolean",
    "text": {
    "@odata.type": "microsoft.graph.accessPackageLocalizedContent"
    },
    "sequence": "Integer"

    }  
    

    ],
    "requestorSettings": {
    "@odata.type": "microsoft.graph.requestorSettings"
    },
    "requestApprovalSettings": {
    "@odata.type": "microsoft.graph.approvalSettings"
    },
    "accessReviewSettings": {
    "@odata.type": "microsoft.graph.assignmentReviewSettings"
    }
    }

    Values defined should be:

    272144-image.png

    Thanks,
    Akshay Kaushik

    Please "Accept the answer", "Upvote" and rate your experience if the suggestion works as per your business need. This will help us and others in the community as well.

    0 comments No comments