Share via

OnPasswordSubmit JIT migration listener configured per docs, extension never invoked (AADSTS50000 with no auth-events SP sign-in log)

Abir 0 Reputation points
2026-05-23T10:32:36.7033333+00:00

Summary

JIT password migration via OnPasswordSubmit in a Microsoft Entra

External ID tenant. Resources configured per

https://learn.microsoft.com/en-us/entra/external-id/customers/how-to-migrate-passwords-just-in-time.

All resources confirmed registered. At sign-in time, the extension is

never invoked — Microsoft errors at the password authentication step

with AADSTS50000 and produces no sign-in log entry for the

auth-events service principal

Environment

  • Tenant: External ID (CIAM) — workforce + consumer surfaces both present
    • requestedAccessTokenVersion: 2 on the resource app
    • Sign-in flow type: externalUsersSelfServiceSignUpEventsFlow
    • Custom auth extension app reg: appId 5b89f114-… (redacted in production), signInAudience: AzureADMyOrg, identifierUris include the FQDN form matching the extension targetUrl
    • RSA usage=Encrypt certificate registered on the app reg
    • Client app triggering JIT: a separate web app reg (admin SSO)

What's wired up

  • Custom auth extension of type #microsoft.graph.onPasswordSubmitCustomExtension with azureAdTokenAuthentication, resourceId matches api://<fqdn>/<appId>
  • Listener of type #microsoft.graph.onPasswordSubmitListener, handler onPasswordMigrationCustomExtensionHandler, migrationPropertyId = extension_<appIdNoDashes>_toBeMigrated, conditions reference the client app's appId
  • Directory extension property toBeMigrated (Boolean) defined on the extension app
  • Test user has extension_<…>_toBeMigrated = true (verified via Graph GET)
  • Role wiring:
    • Extension app's service principal holds CustomAuthenticationExtensions.Receive.Payload (214e810f-…) on Microsoft Graph
    • Microsoft auth-events SP (99045fe1-7639-4a75-9d4a-577b6ca3810f) holds a custom CustomAuthenticationExtension (Application) role exposed on the extension app

Failure pattern

  1. User clicks "Sign in with Microsoft"
  2. CIAM hosted page shows; user enters email/password
  3. Sign-in returns to the relying party with error=server_error&error_description=AADSTS50000:+There+was+an+error+issuing+a+token+or+an+issue+with+our+sign-in+service
  4. Entra sign-in logs: the user sign-in shows the password authentication step failed with AADSTS50000. Failure reason: "service error." No corresponding service-principal sign-in entry for Azure Active Directory Authentication Extensions (the auth-events SP).
  5. Our webhook is never called — confirmed via Cloudflare tunnel inspector (zero inbound requests during the failed sign-in window)
  6. Confirmation that the listener exists in the tenant via GET /v1.0/identity/authenticationEventListeners (returns the onPasswordSubmitListener we registered with the right customExtension.id)

Specific question

Given the listener is registered and the extension exists, what causes Microsoft's auth-events service to fail at the token-issuance step before invoking the extension? The absence of a sign-in log entry for the auth-events SP suggests the failure precedes any auditable attempt to acquire a token for our resource. Is there a tenant-level capability or role wiring beyond the documented setup?

Recent failure trace IDs (most recent first):

  • 5dc45074-f575-4bd7-873b-2b4e46620100
  • 384217b5-1f8b-44b7-ba67-f558da640100
  • 7a11864f-8bf2-42c9-8518-2af403440100

Login works fine if password is reset and correct password is applied. When password is incorrect and we need to migrate, this issue occurs.

Microsoft Security | Microsoft Entra | Microsoft Entra External ID

1 answer

Sort by: Most helpful
  1. Sina Salam 29,596 Reputation points Volunteer Moderator
    2026-05-24T12:46:27.4033333+00:00

    Hello Abir,

    Welcome to the Microsoft Q&A and thank you for posting your questions here.

    I understand that you are having issues with the OnPasswordSubmit JIT migration listener configured per docs, extension never invoked (AADSTS50000 with no auth-events SP sign-in log).

    Regarding your explanation, your webhook is not the problem yet. The failure is occurring before Microsoft Entra dispatches the OnPasswordSubmit callout. You can isolate and fix it by the below:

    1. Run validateAuthenticationConfiguration against the OnPasswordSubmit custom extension to catch endpoint/authentication-contract errors pre-runtime. Use the beta validation API because Microsoft’s beta validation explicitly supports onPasswordSubmitCustomExtension. - https://learn.microsoft.com/en-us/graph/api/customauthenticationextension-validateauthenticationconfiguration?view=graph-rest-beta
    2. On the failing sign-in, open Sign-in logs → Authentication Events and capture the 10030xx error code. Do not rely on service-principal sign-in logs as your primary signal; Microsoft documents the Authentication Events tab as the supported diagnostic view for custom authentication extension failures. - https://learn.microsoft.com/en-us/entra/identity-platform/custom-extension-troubleshoot
    3. If you get 1003014/1003015, fix the extension contract so that resourceId is exactly api://<same-fqdn-as-targetUrl>/<appId> and the FQDN matches the targetUrl. - https://learn.microsoft.com/en-us/entra/identity-platform/custom-extension-troubleshoot, https://learn.microsoft.com/en-us/graph/api/resources/onpasswordsubmitcustomextension?view=graph-rest-1.0
    4. If you get 1003016/1003017/1003018/1003019, fix the service-principal state for the API app referenced by resourceId: it must exist in the tenant and be enabled. - https://learn.microsoft.com/en-us/entra/identity-platform/custom-extension-troubleshoot
    5. If you get 1003021, grant/admin-consent Microsoft Graph → CustomAuthenticationExtensions.Receive.Payload to the API app used by the extension. Microsoft documents this exact missing consent as a blocking error. - https://learn.microsoft.com/en-us/entra/identity-platform/custom-extension-tokenissuancestart-configuration,
    6. Rebuild the extension/API authentication using Microsoft’s documented model: create a dedicated API app registration from the custom extension API Authentication step, then secure the Azure Function/API with the external tenant issuer https://{domain}.ciamlogin.com/{tenantId}/v2.0, allow client app 99045fe1-7639-4a75-9d4a-577b6ca3810f, and allow only your tenant. - https://learn.microsoft.com/en-us/entra/identity-platform/custom-extension-tokenissuancestart-configuration, https://learn.microsoft.com/en-us/entra/identity-platform/custom-extension-overview

    Meanwhile, use the associated links for more readings and detail steps. It's all about you run the validation API, capture the Authentication Events error code, fix the exact configuration defect it identifies, and only after those two supported checks are clean should you treat the case as a likely Microsoft service-side incident requiring a support ticket with the supplied trace IDs. Ans you can raise ticket via your Azure Portal.

    I hope this is helpful! Do not hesitate to let me know if you have any other questions, steps or clarifications.


    Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful.

    Was this answer helpful?


Your answer

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