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.
What are directory extensions
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.
Already have custom attributes?
If you already have directory extensions created and populated in Entra ID, follow these steps to sync them with Staffbase.
Verify your extension attributes belong to the Staffbase app
Before mapping, confirm that your existing extension attributes were created under the correct app registration:
- In Microsoft Azure, navigate to Microsoft Entra ID > App registrations.
- Select the app registration you created for Staffbase integration.
- 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}/extensionPropertiesIf your attributes appear in the response, proceed to Map extension attributes in Staffbase Studio.
If your attributes are under a different app registration
If your extension attributes were created under a different app registration, they won’t be visible to Staffbase. You have two options:
- Recreate the attributes under the Staffbase app registration using the steps in Create new custom attributes.
- Migrate your data to new extension attributes created under the Staffbase app registration.
Create new custom attributes
If you need to create new directory extensions for syncing with Staffbase, follow these steps.
Step 1: Navigate to your Staffbase app registration
- In Microsoft Azure, navigate to Microsoft Entra ID > App registrations.
- Select the app registration you created for Staffbase integration.
- Copy the Application (client) ID; you will need it to create extension attributes.
Step 2: 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}/extensionPropertiesContent-Type: application/json
{ "name": "JobGroup", "dataType": "String", "targetObjects": ["User"]}After creation, Entra ID automatically generates the full attribute name using your AppId.
Step 3: Populate the extension attributes with user data
- Use Microsoft Graph API or Azure AD PowerShell to assign values to the custom attributes for your users.
- 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"}Map extension attributes in Staffbase Studio
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.
Additional helpful information
For detailed information about working with directory extensions in Microsoft Entra ID, refer to the official Microsoft documentation: