Skip to main content

System > Integrations > Microsoft Entra ID Directories

Introduction

Teramind’s integration with Microsoft Entra ID (formerly Azure AD) streamlines user management by automating the synchronization* of employee and group data directly from your cloud directory into Teramind. This connection ensures that your monitoring environment remains synchronized with your organizational hierarchy.

*Sync Type & Frequency:

  • Teramind performs a one-way sync, only importing data from your Azure directory. Any changes made to these resources within Teramind will not be pushed back or saved to your directory.

  • Syncs occur automatically once daily at midnight UTC. However, you can manually trigger a sync anytime (see Managing Existing Integrations).

Prerequisites

Prior to integration, please ensure the Entra ID/Azure account used for this process has the following options enabled within its Azure profile:

Assigned Roles

  • Application Administrator

  • Cloud Application Administrator

  • Global Administrator

Overview > B2B collaboration

User type set to: Internal

Check out the following sections to learn more about these settings and how to verify/manage them.

Assigned Roles

To authorize the connection between Teramind and your directory, the person performing the setup must have high-level permissions to "consent" to the integration. Without these roles, Microsoft will block the connection for security reasons. You must have the following Assigned Roles:

  • Application Administrator

  • Cloud Application Administrator

  • Global Administrator

You can check/add role assignments from your Microsoft Azure portal:

To check or manage assigned roles:

1. Sign in to the Microsoft Entra admin center.

2. Browse to Entra ID > Users > All users.

3. Select user name > Assigned roles.

You can see the list of roles assigned to the user at different scopes. Additionally, you can see whether the role has been assigned directly or via a group.

B2B Collaboration

B2B Collaboration refers to the setting that determines a user's identity type within your directory. Teramind requires the integrating administrator to be an Internal user type to prevent authentication handoff errors during the sync process. If admin is an External type, you can convert them to an Internal user from their user profile:

To check or convert B2B collaboration type:

1. Sign in to the Microsoft Entra admin center.

2. Browse to Entra ID > Users > All users.

3. Select user name > Overview.

4. Under B2B collaboration, click Convert to internal user if it’s not set to internal already.

Setting Up a New Integration

The integrations screen allows you to manage integrations with Teramind’s own apps or third-party solutions.

1. Navigate to the System > Integrations menu.

2. Click Microsoft Entra ID Directories. You will be taken to a new screen:

3. Click the Connect button. A login window will pop up:

4. Select your account to sign in. You might need to provide your 2FA authentication.

If authentication fails, it is likely due to insufficient permissions. Please revisit the Prerequisites section to verify your Azure account configuration.

Once authenticated, you will be redirected to the Permissions requested screen:

5. Review the permissions; click the Accept button to continue. You will be connect to your account and the window will close automatically. Go back to your Teramind Dashboard.

6. Click the Continue button. If the connection is successful, you will see the Microsoft Entra ID Directories screen:

7. At the top, you will see total number of Users and Groups currently recognized in your Entra ID environment.

8. Below overview section, you will see the section for the Extraction Rules.

9. Under the extraction rules, you will see the section for Mapping Rules.

10. Click the Add rules button to add a new rule.

11. Click the Toggle buttons to enable/disable rules.

12. Click the Three Dots in front of a rule to access its Context Menu. From the Context Menu, you can:

  • Edit: to edit the rule.

  • Increase priority*: to increase the priority (order) of the rule.

  • Decrease priority*: to decrease the priority (order) of the rule.

  • Remove: to delete the rule.

12. Click the Launch button to begin the syncing process.

*Rule Priority (Order)

The order of the rules is critical because Teramind processes them sequentially to determine the final dataset. Rule priority functions on a top-down basis: the first rule that applies to a user or group will dictate the outcome. For example, if a high-order rule excludes a specific group, but a lower-order rule includes a specific user within that group, that user will not be extracted because the exclusion rule was triggered first. However, if you reverse the priority by moving the inclusion rule to the top, the user will be successfully extracted before the group-wide exclusion is even considered. To ensure your sync works as intended, always place your most specific "Include" rules at the top of the list.

Configuring Rules

Extraction Rules

Extraction Rules determine which data is pulled from your Entra ID directory into Teramind. By carefully configuring these rules, you ensure that only necessary information is synchronized, which keeps your system efficient and clutter-free.

Note on Default Behavior

Teramind uses an "Exclude by Default" logic. Only users/groups explicitly included via a rule will be synchronized.

For example, if your directory contains Groups A, B, and C, and you set the following rules:

  • Include Users from Group A

  • Exclude Users from Group B

Only Group A will be imported. Group B is explicitly excluded, and Group C is implicitly excluded because it was not defined in an "Include" rule.

General

Name:

Give a descriptive title to identify this specific rule within your configuration list.

Target:

Defines the entity type this rule affects. You can select from User or Group.

Action:

Action defines the logic to be executed by the rule. You can select Include to include users or groups or select Exclude to skip them from import.

Condition

The Condition section allows you to apply conditional logic to your rule. Conditions are logical expressions to evaluate to True or False only. When a Condition is true for a rule, the associated Action is applied. Below is an explanation of each condition type along with example field input and values to guide your configuration.

All

This is a "pass-through" condition where the rule applies to every entity being synchronized. This always evaluates to True, meaning the rule/condition is always applied.

  • Example Field: N/A

  • Example Values: N/A

The rule is executed for all imported objects.

None

This is the opposite of the “All” type. This effectively disables the rule, as it specifies that no entities meet the criteria. This always evaluates to False, meaning the rule/condition is never applied.

  • Example Field: N/A

  • Example Values: N/A

The rule never executes.

Field equals

Field value equals specified value. The rule only runs if a specific directory field exactly matches the provided value.

  • Example Field: “department”

  • Example Values: “Sales”

Field not equals

Field value does not equal specified value. The rule runs for all entities except those where the specific field matches the provided value.

  • Example Field: “usageLocation”

  • Example Values: “US”

Applies the rule only to employees outside the US.

Field exists

Field is present and not “None”.

  • Example Field: “employeeId”

  • Example Values: N/A

This ensures the rule only runs for users who have an ID assigned in Entra directory.

Field is empty

Field is empty (“None”, empty string, or empty list).

  • Example Field: “groupId”

  • Example Values: N/A

Useful for identifying users missing a group ID.

Field is not empty

Field is not empty (has a value).

  • Example Field: “email”

  • Example Values: N/A

This ensures that only users with an email address is evaluated.

Field in list*

Field value is in the specified list. It’s used to trigger a rule when a single-value attribute in your directory matches any one of multiple specified values. This is essentially a shorthand way of applying "Field equals" logic to several different items simultaneously.

  • Example Field: “officeLocation”

  • Example Values: “New York, Miami, Chicago”

The rule will execute for any user whose office is located in any of these three specific cities.

Field not in list

Field value is not in the specified list. It’s the opposite of “Field in list” type.

  • Example Field: “officeLocation”

  • Example Values: “Washington, Virginia”

Field matches regex

Field value matches the specified regular expression.

  • Example Field: “officeLocation”

  • Example Pattern: “^\\d+.*ave.+wy\\s+\\d{5}$”

When you select this type, you will also see several options for the Pattern field:

  • Case insensitive (i)

  • Multiline (m)

  • DotAll (s)

In this example, the regex will match Teramind’s office location (“525 Randall Ave Ste 100, PMB 491, Cheyenne, WY 82001”):

  • i: Matches “Ave” and “WY” even though pattern uses lowercase “ave” and “wy”.

  • s: spans across the blank line between "PMB 491" and "Cheyenne"

  • m: The $ matches at the end of the last line, not requiring the string to have no trailing content

Field intersects list*

Field list has at least one value in common with the specified list (set intersection). It’s a powerful type designed specifically for attributes that can contain multiple values, such as group memberships, email aliases, or multi-select custom fields. It determines if there is any overlap between the set of values stored in the source directory and the list of values you define in the rule.

  • Example Field: “memberOf”

  • Example Values: “ID_Finance, ID_Legal, ID_HR”.

This is useful for identifying users who belong to at least one of several specific departments or security tiers. The “memberOf” attribute typically contains a list of all groups a user belongs to. The rule executes for any user who is a member of the Finance group, the Legal group, OR the HR group.

*Field In List vs. Field Intersects List

The primary difference between Field in list and Field intersects list depends on whether the data coming from your directory is a single piece of information or a collection of items.

Field in list is used when a user has a single value (such as one specific Department or a City) that you want to check against a list of several possibilities. For the condition to trigger, that specific value must be found within the list you provided. For example, if you set the list to "Sales, Marketing, HR," and a user’s department is "Sales," the rule triggers because "Sales" is in your list.

Field intersects list is used when a user has multiple values (such as membership in several different Groups or a list of email aliases). The condition triggers if there is a "set intersection," meaning at least one of the user's many values matches at least one value in your specified list. For example, if a user belongs to five groups and you provide a list of three specific Group IDs, the rule triggers as long as the user belongs to at least one of those three.

In summary, use Field in list to check if one single attribute matches one of many choices, and use Field intersects list to check if any part of a multi-value collection overlaps with your list.

Mapping Rules

Mapping Rules transform and map entity data to target systems. You can define how data is transformed when imported from Entra ID into Teramind. These rules allow you to clean, format, or modify specific attributes before they are assigned to a user profile.

Synchronization Requirements:

To successfully sync a user from Entra ID to Teramind, the user must have an email address, first name, and last name defined. These attributes can be assigned either statically within Entra ID or dynamically using the Teramind mapping rules.

General

Name:

Give a descriptive title to identify this specific rule within your configuration list.

Target:

Defines the entity type this rule affects. You can select from User or Group.

Action and Parameters:

Actions determine the specific operations Teramind performs when a rule's criteria are met, such as "Enable monitoring" or "Set position from field."

While many actions are universal, others are context-sensitive and will only appear if the target is a "User" or a "Group".

Certain actions also include granular parameters to further refine the behavior; for instance, the "Sync department from group" action provides toggle options to "Create department if it doesn't exist" and "Update existing department data". This ensures that the synchronization doesn't just pull data, but manages how that data interacts with your existing Teramind organizational structure.

The following table details the available actions for each target type and their associated configuration parameters:

Enable monitoring

Enable monitoring for the selected user.

Target: User

Parameters:

N/A

Disable monitoring

Disable monitoring for the selected user.

Target: User

Parameters:

N/A

Map fields

Map source fields to target fields.

Target: User, Group

Parameters:

Supports the List of field mappings parameter with two sub parameters:

  • Entra ID field name: is the source field.

  • Teramind field: is the target/destination field in Teramind.

For example, Map Entra field “mobilePhone” to Teramind’s “Phone” field or map “displayName” to "firstName”, etc.

Template field

Set a field using a dynamic template string. This action sets a Teramind field using a dynamic template string that combines static text with variables from your directory.

Target: User, Group

Parameters:

This action supports two parameters:

  • Field name on the desired entity to set: lets you select a field. For example, “position”.

  • Template string: lets you specify the string. For example, “User:$displayName, Depatement:$deptId”.

In the above example, if a user’s display name is "Alice" and her department ID is "Engineering," the position field in Teramind will be automatically populated as "User: Alice, Department: Engineering".

Regex transform

Apply regex transformation to a source field and set the result on a target field.

Target: User, Group

Parameters:

This action supports a few parameters:

  • Field from unified entity to transform: the raw data field coming from Entra ID (e.g., “businessPhones”).

  • Field on desired entity to set the result: the specific field in Teramind where the modified data will be saved (e.g., “phone”).

  • Regex pattern to match: the search criteria used to identify the part of the text you want to change (see example below).

  • Replacement string: what the matched text should be changed to. You can use capture groups (like “\1”) to keep parts of the original text (see example below).

  • Regex flags: Options to modify search behavior, such as Case insensitive, Multiline, or DotAll.

As an example, suppose your Entra ID stores phone numbers with an internal extension (e.g., “+1-555-0199 ext 123”) but you only want the main number in Teramind. You would set up the Regex pattern to match as something like “(\+\d-\d{3}-\d{3}-\d{4}).*” and set up the Replacement string as “\1”.

Normalize field

Normalize a field value by converting to lowercase and removing all whitespace. This action is used for basic data cleanup to ensure consistency across your directory. For example, if email addresses in Entra ID contain inconsistent capitalization or accidental spaces, you can use the Normalize field action.

Target: User, Group

Parameters:

This action comes with four parameters:

  • Field from unified entity to normalize: target Entra ID field. For example, “mail”.

  • Field on desired entity to set the result: Destination Teramind field. For example, “email”.

  • Remove all whitespace from the value: removes all spaces from the field value.

  • Convert to lowercase: converts the value to lowercase letters.

Result: An entry like "[email protected]" would be saved in Teramind as "[email protected]".

Set position from field

Set position for the employee based on a field from the unified entity.

Target: User

Parameters:

This action supports only one parameter:

  • Field from unified entity to use as position: select the position field from Entra ID. For example, “jobTitle”.

For example, If the Entra ID jobTitle for a user is "Senior Analyst," their Position in Teramind will be set to "Senior Analyst".

Set position from value

Set position for the employee based on a static value.

Target: User

Parameters:

Similar to the above action but uses static value instead so that you can type the position manually.

  • Static position value to set: The specific text string you want to appear in the Teramind Position field. For example, “Remote Consultant”.

In the above example, every user processed by this rule will have their position in Teramind set to "Remote Consultant”.

Create departments from user field

Create departments based on unique values from a specified user field.

Target: User

Parameters:

This action comes with two parameters:

  • User field to use for department name: select the source field from the directory (e.g., “officeLocation”).

  • Prefix for generated department IDs: optional prefix (e.g., “DEP-“) to help categorize these specific departments.

In the above example, if "New York" is found in the specified user field, Teramind will automatically create or map the user to a "DEP-New York" department.

Sync employee

Synchronize employee data from user entity. Basically, this action lets you manage how user accounts are handled during the synchronization process.

Target: User

Parameters:

This action comes with two parameters:

  • Create employee if it doesn't exist: when enabled, Teramind will automatically generate a new employee profile if a matching record is not found during the sync.

  • Update existing employee data: when enabled, Teramind will overwrite existing employee profile information with the latest data imported from the source directory.

Sync department from group

Synchronize employee data from group entity. It basically automates department management by syncing specific Groups from the directory as Departments in Teramind.

Target: Group

Parameters:

This action comes with two parameters:

  • Create department if it doesn't exist: Automatically creates the department in Teramind if it is missing.

  • Update existing department data: Ensures Teramind department details stay current with directory updates.

Add employees to departments by field match

Add employees to departments based on matching field values. Automatically assigns IDs in employees and departments.

Target: User, Group

Parameters:

This action has two parameters:

  • Field from employee's source entity to use for matching: The attribute in your Entra directory that contains the department information for the user.

  • Field from department to match against: The field within the Teramind Department settings that must be identical to the source data (defaults to the “name” field).

Example 1: Direct Name Matching:

This is the most common setup where a user's department attribute in the directory exactly matches the name of a department you have already created in Teramind:

  • Source Field: “department”

  • Match Field: “name”

Scenario: If a user’s Entra ID department attribute is "Customer Success" and you have a department in Teramind named "Customer Success," the user will be automatically added to that department.

Example 2: Regional Department Assignment:

You can use geographic data to sort users into regional departments you have established in Teramind:

  • Source Field: “officeLocation” or “city”

  • Match Field: “name”

Scenario: A user located in "London" will be added to the Teramind department named "London," allowing you to apply region-specific monitoring settings automatically.

Note: If the value in the source field does not have a corresponding match in Teramind, the user will not be assigned to any department by this specific rule.

Relate employees to department by group membership

Automatically relate employees to departments based on their Entra ID group memberships. Links employees to specific Teramind departments based on their membership in organizational groups within the Entra directory.

Target: User, Group

Parameters:

N/A

Condition

The Condition section for mapping rules functions identically to the Condition section in the extraction rules.

Managing Existing Integrations

Once you have any integration(s) in place, you will be able to manage them from the Integrations screen:

1. Click the Gear icon under the Actions column to configure an integration. You will be taken to the Microsoft Entra ID Directories screen:

2. Sync Directory: Click the Sync Now button to manually trigger your rules and update the resources in Teramind.

3. Revoke Connection: Click Revoke button to remove the integration. Note: you can also remove an integration from the main Integrations screen.

Revoking a connection will stop all syncing for users, groups, rules, and remove the integration. This action cannot be undone. However, any resources already imported will remain in Teramind.

4. Manage Rules: Use this screen to add, edit, or toggle rules. For detailed configuration steps, see the Setting Up a New Integration section.

Removing the Integration

Uninstalling the App from Azure

1. Select Microsoft Entra ID from your Azure portal.

2. Select Enterprise applications from the left panel.

3. Select All applications from the left panel.

4. Find the Teramind Entra ID app and click on it.

5. Select Manage > Properties from the left panel.

6. Click the Delete button on top to remove the app.

Removing the Integration from Teramind

Click the Trash Can icon under the Actions column to remove an integration from Teramind.

Revoking a connection will stop all syncing for users, groups, rules, and remove the integration. This action cannot be undone. However, any resources already imported will remain in Teramind.

Did this answer your question?