Microsoft Entra ID
runZero integrates with Microsoft Entra ID (formerly Azure AD) to allow you to sync and enrich your asset inventory, as well as gain visibility into Entra ID users and groups. Adding your Entra ID data to runZero makes it easier to find assets that are not part of your domain.
Note that Entra ID is still referred to as Azure AD within the runZero product.
Getting started
To set up the Entra ID integration, you’ll need to:
-
Configure Entra ID to allow API access through runZero.
-
Add the Entra ID credential in runZero.
-
Choose whether to configure the integration as a scan probe or connector task.
-
Activate the Entra ID integration to sync your data with runZero.
Requirements
Before you can set up the Entra ID integration, make sure you have access to the Microsoft Azure portal.
Step 1: Register an Azure application for Entra ID API access
runZero can authenticate to the Entra ID API using either a username and password or a client secret. Register an application to configure Entra ID API access.
-
Sign in to the Microsoft Azure portal.
-
Go to App registrations and click + New registration.
- Provide a name.
- Select the supported account types.
- Optionally add a redirect URI.
-
Click Register to register the application.
-
Once the application is created, go back to the main Azure portal page and select App registrations. You should be able to find the application you just registered. (It may help to select the Owned applications tab.) Click on the app’s name
-
You should see the an overview of the app registration. Note the following information:
- Application (client) ID
- Directory (tenant) ID
-
Click on the display name of the application to go to its management pages.
-
Select the Manage > Authentication section on the left. Set Allow public client flows to Yes and then save the configuration.
-
Go to API permissions and click + Add a permission.
-
Select Microsoft Graph from the list of Microsoft APIs.
-
Select the correct permissions type for your needs:
- Username & password: select Delegated permissions
- Client secret: select Application permissions
-
Search for and select the following required permissions:
- Device.Read.All
- Group.Read.All
- User.Read.All
-
Click Add permissions to save the permissions to the application.
-
If using a client secret, also perform the following steps:
- Navigate to Azure Active Directory > App registrations and select the application you created.
- Go to Certificates & secrets and click on New client secret.
- Enter a description.
- Select the expiration.
- Click Add to create the client secret and save the client secret value.
Add the Entra ID credential to runZero
Step 2a: Add an Azure Username & Password credential to runZero
-
Go to the Credentials page in runZero and click Add Credential.
-
Provide a name for the credential, like
Azure Username & Password
. -
Choose Azure Username & Password from the list of credential types.
-
Provide the following information:
- Azure application (client) ID - The unique ID for the registered application. This can be found in the Azure portal if you go to App registrations and select the application.
- Azure directory (tenant) ID - The unique ID for the tenant. This can be found in the Azure portal if you go to App registrations and select the application.
- Azure username - The username for your Azure cloud account. This cannot be a federated user account.
- Azure password - The password for your Azure cloud account.
-
If you want other organizations to be able to use this credential, select the
Make this a global credential
option. Otherwise, you can configure access on a per organization basis. -
Save the credential. You’re now ready to set up and activate the connection to bring in data from Azure.
Step 2b: Add an Azure Client Secret credential to runZero
This type of credential can be used to sync all resources in a single directory (across multiple subscriptions).
-
Go to the Credentials page in runZero and click Add Credential.
-
Provide a name for the credential, like
Azure Client Secret
. -
Choose Azure Client Secret from the list of credential types.
-
Provide the following information:
- Azure application (client) ID - The unique ID for the registered application. This can be found in the Azure portal if you go to App registrations and select the application.
- Azure client secret - To generate a client secret, go to App registrations, select your application, go to Certificates & secrets and click on + New client secret.
- Azure directory (tenant) ID - The unique ID for the tenant. This can be found in the Azure portal if you go to App registrations and select the application.
- Select the Access all subscriptions in this directory (tenant) option to sync all resources in your directory. Otherwise, specify the Azure subscription ID - The unique ID for the subscription that you want to sync. This can be found in the Azure portal if you go to Subscriptions and select the subscription.
-
If you want other organizations to be able to use this credential, select the Make this a global credential option. Otherwise, you can configure access on a per organization basis.
-
Save the credential. You’re now ready to set up and activate the connection to bring in data from Azure.
Step 3: Choose how to configure the Entra ID integration
The Entra ID integration can be configured as either a scan probe or a connector task. Scan probes gather data from integrations during scan tasks. Connector tasks run independently from either the cloud or one of your Explorers, only performing the integration sync.
Step 4: Set up and activate the Entra ID integration to sync data
After you add your Entra ID credential, you’ll need to set up a connector task or scan probe to sync your data.
Step 4a: Configure the Entra ID integration as a connector task
A connection requires you to set a schedule and choose a site. The schedule determines when the sync occurs, and the site determines where any new Entra ID-only assets are created.
-
Activate a connection to Entra ID. You can access all available third-party connections from the integrations page, your inventory, or the tasks page.
-
Choose the credential you added earlier. If you don’t see the credential listed, make sure it has access to the organization you are currently in.
-
Optionally provide a filter following the Microsoft Graph API filter syntax. We will only import devices that match the filter.
-
Enter a name for the task, like
Entra ID sync
. -
Schedule the sync. A sync can be set to run on a recurring schedule or run once. The schedule will start on the date and time you have set.
-
Under Task configuration, choose the site you want to add your assets to.
-
If you want to exclude assets that have not been scanned by runZero from your integration import, switch the Exclude unknown assets toggle to Yes. By default, the integration will include assets that have not been scanned by runZero.
-
If you want to include assets in your integration import that the Entra ID account has marked as inactive, switch the Include inactive assets toggle to Yes. By default, the integration will not include assets that are marked as inactive.
-
Activate the connection when you are done. The sync will run on the defined schedule. You can always check the Scheduled tasks to see when the next sync will occur.
Step 4b: Configure the Entra ID integration as a scan probe
-
Create a new scan task or select a future or recurring scan task from your Tasks page.
-
Add or update the scan parameters based on any additional requirements.
-
On the Probes and SNMP tab, choose which additional probes to include, set the Azure AD toggle to Yes, and change any of the default options if needed.
-
On the Credentials tab, set the Azure AD toggle for the credential you wish to use to Yes.
-
Click Initialize scan to save the scan task and have it run immediately or at the scheduled time.
Step 5: View Entra ID assets
After a successful sync, you can go to your inventory to view your Entra ID assets. These assets will have an Active Directory icon listed in the Source column.
To filter by Entra ID assets, consider running the following queries:
- View all Entra ID assets:
source:azuread
- View runZero assets not connected to Entra ID:
source:runzero AND NOT source:azuread
Click into each asset to see its individual attributes. runZero will show you the attributes returned by Entra ID.
The Entra ID integration provides details about users and groups in addition to enriching asset inventory data. Go to Inventory > Users or Inventory > Groups to view the data provided by Entra ID.
Filtering Entra ID assets
An optional filter can be applied to Entra ID integration tasks. runZero uses Microsoft Graph $filter
query paramater to filter assets. GraphQL follows the syntax <property> [operator] <value>
. Multiple expressions can be combined for more complex filtering by adding an and
or or
between expressions.
Properties
Any property that runZero imports from Entra ID can be used to apply a filter. The following are some examples.
Entra ID Property | runZero Attribute | Description | Example |
---|---|---|---|
displayName |
@azuread.dev.displayName | The hostname of the device | EXPLORER-01 |
operatingSystem |
@azuread.dev.operatingSystem | The operation system of the device | Windows |
operatingSystemVersion |
@azuread.dev.operatingSystemVersion | The version of the specified operoating system | 10.0.x |
manufacturer |
@azuread.dev.manufacturer | The manufacturer of the device | Dell Inc. |
model |
@azuread.dev.model | The model of the device | Precision 3560 |
isManaged |
@azuread.dev.isManaged | Boolean value specifying whether device is managed | true, false |
managementType |
@azuread.dev.managementType | Description of how the device is managed | MDM, MicrosoftSense |
deviceOwnership |
@azuread.dev.deviceOwnership | Description of who owns the device | Company, Personal |
Operators
The following are common operators that can be used in an Entra ID filter.
- Equal to (
eq
) - Not equal to (
ne
) - Has (
has
) - Less than (
lt
) - Greather than (
gt
) - Less than or equal to (
le
) - Greater than or equal to (
ge
)
The following are common functions that can be used in an Entra ID filter. Functions follow the syntax function(<property>, <value>)
.
- Starts with (
startswith
) - Ends with (
endswith
) - Contains (
contains
)
Example Filters
The following are examples of filters that can be applied to an Entra ID integration.
Search Filter | Description |
---|---|
not(operatingSystem has 'Android') |
Import all assets except those with an Android operating system |
not(operatingSystem eq 'iOS') and not(operatingSystem eq 'iPad') |
Import all assets execpt those with an iOS or IPad operating system |
startswith(displayName, 'PROD') |
Import all devices with a hostname that starts with PROD |
not(startswith(displayName, 'DEV')) |
Import all devices except those with a hostname that starts with DEV |
deviceOwnership eq 'Company' or isManaged eq true |
Import all devices that are owned by company or that are configured as managed devices |
For more information about filter syntax and additional examples, check Microsoft’s Graph API documentation.
Troubleshooting
If you are having trouble using this integration, the questions and answers below may assist in your troubleshooting.
Why is the Azure Active Directory integration unable to connect?
-
Are you getting any data from the Entra ID integration?
- Make sure to query the inventory rather than look at the task details to review all the data available from this integration.
- In some cases, integrations have a configuration set that limits the amount of data that comes into the runZero console.
-
Some integrations require very specific actions that are easy to overlook. If a step is missed when setting up the integration, it may not work correctly. Please review this documentation and follow the steps exactly.
-
If the Entra ID integration is unable to connect be sure to check the task log for errors. Some common errors include:
- 500 - server error, unable to connect to the endpoint
- 404 - hitting an unknown endpoint on the server
- 403 - not authorized, likely a credential issue
How do I solve the following Entra ID errors?
-
(invalid_client) AADSTS7000218: The request body must contain the following parameter: 'client_assertion' or 'client_secret'
-
This error can be corrected by enabling Allow Public Client Flows in Entra ID. This can be accomplished by entering the Application details page under Authentication > Advanced Settings. From here you can toggle the Allow Public Client Flows setting to Yes.
-
It can also be helpful to ensure that application permissions were granted correctly when registering the Azure application for Entra ID API access. To do this, navigate to the API permissions settings page and ensure that each of the API/Permissions have the type set to application. Also make sure that the permission granted is Grant Admin Consent for Default Directory.
-
-
failed to get Entra ID groups: invalid response: 403 (403 Forbidden)
This error is likely due to an issue with credentials. Please review the documentation and check your credentials to ensure everything was entered correctly and no steps were accidentally skipped.