Sync Custom Attributes From Entra ID to Staffbase Email

Learn how to create, populate, and map custom attributes from Microsoft Entra ID to Staffbase using directory extensions.

Staffbase Email

Staffbase Email supports the synchronization of user data from Microsoft Entra ID. In many organizations, essential profile information goes beyond the default Entra ID schema. For example, campaign info, job groups, and so on. To bring custom information into Staffbase, you can use directory extensions. These allow you to add organization-specific attributes in Entra ID and make them available for syncing.

This guide explains how to sync directory extensions to Staffbase, whether you already have them or need to create new ones.

Microsoft Entra ID allows you to extend its default schema using directory extensions (extensionProperty). These are custom attributes that belong to a specific application registration.

Key characteristics

  • Each directory extension is scoped to a single app registration.
  • Extensions are only visible to the application that created them, identified by its AppId.
  • The system automatically prefixes the attribute name: extension_<AppId-without-hyphens>_<AttributeName>
    Example: extension_1234567890abcdef1234567890abcdef_jobGroup
  • Extensions created by one application cannot be accessed by another.
Custom attributes must be registered under the same app registration used for the Staffbase integration. If you created extension attributes under a different app registration, they will not appear in the Staffbase Studio field mapping interface.

If you already have directory extensions created and populated in Entra ID, follow these steps to sync them with Staffbase.

Before mapping, confirm that your existing extension attributes were created under the correct app registration:

  1. In Microsoft Azure, navigate to Microsoft Entra ID > App registrations.
  2. Select the app registration you created for Staffbase integration.
  3. Check if your extension attributes are listed under this app’s extension properties.

You can verify this using the Microsoft Graph API:

GET https://graph.microsoft.com/v1.0/applications/{staffbase-application-object-id}/extensionProperties

If your attributes appear in the response, proceed to Map extension attributes in Staffbase Studio.

If your extension attributes were created under a different app registration, they won’t be visible to Staffbase. You have two options:

  1. Recreate the attributes under the Staffbase app registration using the steps in Create new custom attributes.
  2. Migrate your data to new extension attributes created under the Staffbase app registration.
There is no way to transfer ownership of extension attributes between app registrations. You must recreate them under the correct app.

If you need to create new directory extensions for syncing with Staffbase, follow these steps.

  1. In Microsoft Azure, navigate to Microsoft Entra ID > App registrations.
  2. Select the app registration you created for Staffbase integration.
  3. Copy the Application (client) ID; you will need it to create extension attributes.

Use the Microsoft Graph API to register the extension attributes under this app’s AppId.

Example Graph API request to create an extension property

You can create as many attributes as needed, such as JobGroup or CostCenter.

POST https://graph.microsoft.com/v1.0/applications/{application-object-id}/extensionProperties
Content-Type: application/json
{
"name": "JobGroup",
"dataType": "String",
"targetObjects": ["User"]
}

After creation, Entra ID automatically generates the full attribute name using your AppId.

  1. Use Microsoft Graph API or Azure AD PowerShell to assign values to the custom attributes for your users.
  2. Update user objects with your new extension properties.
Example Graph API request to update a user with extension property
PATCH https://graph.microsoft.com/v1.0/users/{user-id}
Content-Type: application/json
{
"extension_1234567890abcdef1234567890abcdef_jobGroup": "Engineering"
}

Once your extension attributes are created under the Staffbase app registration and populated with user data, you can map them in Staffbase Studio.

When configuring your Contact Sync in Staffbase Studio, your extension attributes appear in the list of available Entra ID fields. Map each extension attribute to the corresponding profile field in Staffbase.

For detailed information about working with directory extensions in Microsoft Entra ID, refer to the official Microsoft documentation: