Block login using TokenIssuanceStart on Entra ExternalID

Matthew Paul 90 Reputation points
2024-10-23T12:24:32.0366667+00:00

I'm wondering if it's possible to block login using the 'TokenIssuanceStart' event. I know I can block user registration with AttributeCollectionStart and returning a block action.

In the docs for 'TokenIssuanceStart' (https://learn.microsoft.com/en-us/entra/identity-platform/custom-extension-tokenissuancestart-setup?tabs=visual-studio%2Cazure-portal&pivots=azure-portal), I can see how you can add additional claims to the token, but is it also possible to return a block action with this step to prevent a user authenticating? I could purposefully throw an error, but not sure how to handle the outcome of that, and if it would work as I'd want.

Microsoft Security | Microsoft Entra | Microsoft Entra External ID
{count} votes

Accepted answer
  1. Navya 20,575 Reputation points Microsoft External Staff Moderator
    2024-11-01T11:36:10.21+00:00

    Hi @Matthew Paul

    Thank you for posting this in Microsoft Q&A.

    I understand you are facing a challenge regarding the use of the TokenIssuanceStart event in Microsoft Entra Identity Platform. Specifically, you want to know if it is possible to block user logins during this event, similar to how user registration can be blocked using the AttributeCollectionStart event.

    Based on the provided document, The TokenIssuanceStart event is primarily designed for adding claims to tokens during the authentication process. However, it does not directly support blocking user logins in the same way that the AttributeCollectionStart event does for user registration.

    Hope this helps. Do let us know if you any further queries.

    Thanks,

    Navya.

    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

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