How do I get custom attribute values into entra external Id flows in angular?

Simone Jennings 0 Reputation points
2025-08-04T06:49:13.6766667+00:00

I'm setting up a signin/signup flow in Entra External Id and I have custom attributes for "organisationId" and "invitationCode" that I want to send from my angular app and have accessible in my Custom Authentication Extensions (on start and on submit) so I can use them to block signups that aren't accepted or connect Entra External Ids to my own database.
I can see the custom attributes in the payload for the attribute collection on start call as they're connected to the flow and they calls are connected to the flow too, however they are always null.

I'm using MSAL for angular to start the flows and I've tried sending the values in extraQueryParameters as values in the dictionary, they appear to show up in the url its redirected to, but not in the extension calls no matter if I use email password OR sso that I have set up.

How do I get these values through to the custom authentication extensions? Without this information these extension calls become somewhat useless to me.

The code I'm using to start the flow where customParameters contain invitationCode and organisationId values


        this.msalService.loginRedirect({
			scopes: ['user.read','openid', 'profile', 'email', 'offline_access'],
			extraQueryParameters: customParameters,
			prompt:'create',
			domainHint: domainHint,
			correlationId:"12345"
		});

and how these attributes come through to the extension calls:

"extension_{app_Id}_invitationCode":{"value":null,"@odata.type":"microsoft.graph.stringDirectoryAttributeValue","attributeType":"directorySchemaExtension"},

"extension_{app_Id}_organisationId":{"value":null,"@odata.type":"microsoft.graph.int64DirectoryAttributeValue","attributeType":"directorySchemaExtension"},

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

1 answer

Sort by: Most helpful
  1. Praveen Chivarla 105 Reputation points Microsoft External Staff Moderator
    2025-08-18T05:39:18.8633333+00:00

    Hi @Simone Jennings,

    Thank you for posting your query on Microsoft Q&A.

    As per our understanding, you are trying to pass custom values like organisationId and invitationCode from your Angular app into your Entra External ID user flow using MSAL’s extraQueryParameters. While these values appear in the browser's URL, they are showing up as null in your custom API connector calls on both onStart and onSubmit.

    To send custom attribute values (like organisationId and invitationCode) from your Angular app into Microsoft Entra External ID user flows using MSAL, and have them show up in your API connectors.

    Please follow the steps below:

    1**. Register Custom Attributes in Microsoft Entra**

    • Go to Entra ID > External Identities > User attributes.
    • Click Add to create each custom attribute:
      • invitationCode
        • organisationId
        • Save your changes.

    Custom attributes are stored in the format

    extension_<appId>_attributename

    where <appId> is the Application (client) ID of the "aad-extensions-app" registration in your tenant. learn.microsoft

    1. Add Custom Attributes to the User Flow
    • Go to Entra ID > External Identities > User flows.
    • Pick your flow (sign-in/sign-up).
    • Under User attributes, click + Add and select both invitationCode and organisationId.
    • Set them as optional if you wish users not to be blocked if they’re missing.
    • Save the flow. learn.microsoft
    1. Pass Custom Attributes to the API Connector
    • Still within your user flow, visit API connectors.
    • For either the On start or On submit steps:
      • Select your API connector.
        • Under Send claims to your API, click + Add claims and check invitationCode and organisationId.
          • In Advanced or Pass through, toggle Pass query string parameters to Yes—this ensures query parameters from the URL are sent through to your API.
            • Save settings.
    • Repeat for each authentication step where you need these values. learn.microsoft
    1. Update Your Angular (MSAL) Integration

    When using MSAL in Angular, add custom parameters as extraQueryParameters in your loginRedirect or loginPopup call:

    javascript

    this.msalService.loginRedirect({

    scopes: ['openid', 'profile', 'email', 'offline_access'],

      extraQueryParameters: {

    invitationCode: 'YOUR_INVITATION_CODE',

    organisationId: 'YOUR_ORG_ID'  

    },

    prompt: 'create'

    });

    The parameter keys (invitationCode, organisationId) must exactly match those registered as custom attributes and added to the user flow.learn.microsoft.


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.