Skip to content

Latest commit

 

History

History
45 lines (39 loc) · 1.33 KB

File metadata and controls

45 lines (39 loc) · 1.33 KB
description Automatically generated file. DO NOT MODIFY
const options = {
	authProvider,
};

const client = Client.init(options);

const accessPackageAssignmentRequest = {
    '@odata.type': '#microsoft.graph.accessPackageAssignmentRequest',
    requestType: 'userAdd',
    answers: [
        {
            '@odata.type': '#microsoft.graph.accessPackageAnswerString',
            displayValue: 'This is the answer to a multiple choice question',
            value: 'MultipleChoiceAnswerValue',
            answeredQuestion: {
                '@odata.type': '#microsoft.graph.accessPackageMultipleChoiceQuestion',
                id: '8fe745e7-80b2-490d-bd22-4e708c77288c'
            }
        },
        {
            '@odata.type': '#microsoft.graph.accessPackageAnswerString',
            value: 'This is my answer to a text input question.',
            displayValue: 'This is my answer.',
            answeredQuestion: {
                '@odata.type': '#microsoft.graph.accessPackageTextInputQuestion',
                id: '7aaa18c9-8e4f-440f-bd5a-3a7ce312cbe6'
            }
        }
    ],
    assignment: {
        accessPackageId: '977c7ff4-ef8f-4910-9d31-49048ddf3120'
    }
};

await client.api('/identityGovernance/entitlementManagement/assignmentRequests')
	.version('beta')
	.post(accessPackageAssignmentRequest);