Skip to content

Latest commit

 

History

History
34 lines (28 loc) · 912 Bytes

File metadata and controls

34 lines (28 loc) · 912 Bytes
description Automatically generated file. DO NOT MODIFY
const options = {
	authProvider,
};

const client = Client.init(options);

const customAuthenticationExtension = {
  '@odata.type': '#microsoft.graph.onPasswordSubmitCustomExtension',
  displayName: 'Legacy password validator',
  description: 'Validates passwords against a legacy authentication system for JIT migration',
  endpointConfiguration: {
    '@odata.type': '#microsoft.graph.httpRequestEndpoint',
    targetUrl: 'https://api.contoso.com/passwordvalidation'
  },
  authenticationConfiguration: {
    '@odata.type': '#microsoft.graph.azureAdTokenAuthentication',
    resourceId: 'api://api.contoso.com/passwordvalidation'
  },
  clientConfiguration: {
    timeoutInMilliseconds: 2000,
    maximumRetries: 1
  }
};

await client.api('/identity/customAuthenticationExtensions')
	.post(customAuthenticationExtension);