Skip to content

Latest commit

 

History

History
39 lines (33 loc) · 1.09 KB

File metadata and controls

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

const client = Client.init(options);

const customAuthenticationExtension = {
    '@odata.type': '#microsoft.graph.onTokenIssuanceStartCustomExtension',
    displayName: 'onTokenIssuanceStartCustomExtension',
    description: 'Fetch additional claims from custom user store',
    endpointConfiguration: {
        '@odata.type': '#microsoft.graph.httpRequestEndpoint',
        targetUrl: 'https://authenticationeventsAPI.contoso.com'
    },
    authenticationConfiguration: {
        '@odata.type': '#microsoft.graph.azureAdTokenAuthentication',
        resourceId: 'api://authenticationeventsAPI.contoso.com/a13d0fc1-04ab-4ede-b215-63de0174cbb4'
    },
    claimsForTokenConfiguration: [
        {
            claimIdInApiResponse: 'DateOfBirth'
        },
        {
            claimIdInApiResponse: 'CustomRoles'
        }
    ]
};

await client.api('/identity/customAuthenticationExtensions/6fc5012e-7665-43d6-9708-4370863f4e6e')
	.version('beta')
	.update(customAuthenticationExtension);