Microsoft Entra ID Protection (Azure AD Identity Protection)
LAST UPDATED: 05/30/2024
Overview
Microsoft Entra ID Protection is a security tool that detects, investigates and remediates identity-based risks in organizational environments. The collection of Microsoft Graph APIs enables users to query risks detected by identity protection.
D3 SOAR is providing REST operations to function with Microsoft Entra ID Protection.
Microsoft Entra ID Protection is available for use in:
Connection
To connect to Microsoft Entra ID Protection from D3 SOAR, please follow this part to collect the required information below:
Parameter | Description | Example |
Server URL | The Microsoft Entra ID Protection server URL for the connection. | https://graph.microsoft.com |
Auth URL | The auth URL to authenticate the connection. The input URL is https://login.microsoftonline.com/{<tenant_id>}/oauth2/v2.0/token. Replace <tenant_id> with your tenant ID. | https://login.microsoftonline.com/{{tenant_id}}/oauth2/v2.0/token |
Api Version | The version of the API to use for the connection. The default value is v1.0. | v1.0 |
Grant Type | The grant type to authenticate the API connection. Only the client_credentials grant type is supported. | client_credentials |
Client ID | The client ID to authenticate the API connection. | 9c8**************f8a |
Client Secret | The client secret to authenticate the API connection. | 8lE***************vbh |
Scope | The scope for the API connection. This is a fixed default value. No input action is required. | https://graph.microsoft.com/.default |
Permission Requirements
Each endpoint in the Microsoft Entra ID Protection API requires a certain permission scope. The following are required scopes for the commands in this integration:
Command | Required Permission |
Confirm Compromised | IdentityRiskyUser.ReadWrite.All |
Dismiss Risky User | IdentityRiskyUser.ReadWrite.All |
List History | IdentityRiskyUser.Read.All |
List Risk Detections | IdentityRiskEvent.Read.All |
List Risky Users | IdentityRiskyUser.Read.All |
List Sign-In | AuditLog.Read.All and Directory.Read.All |
Test Connection | No permission needed |
Reader Note
The permission list above is used for Application Permissions since the Grant Type is client_credential only. No Delegated permission is needed in this case.
Configuring Microsoft Entra ID Protection to Work with D3 SOAR
Log in to the Azure Portal (https://portal.azure.com/).
Navigate to the top search bar, then search and select App registrations.
If you already have created apps, you can use one of them. Skip to step 5 to obtain the Client ID & Tenant ID. If you do not have an app, click + New registration to create one.
Register the application.
Enter an application Name.
For Supported account types, select Accounts in this organizational directory only (<Your Directory Name> only - Single tenant).
Click Register.
In the App Overview tab, copy and save the Application(client) ID and Directory(tenant) ID. They will be required to build the integration connection in D3 SOAR. Navigate to Client credentials, then click Add a certificate or secret.
Click + New Client Secret. Enter a Description for the client secret, and select a client secret expiry period using the Expires dropdown menu. Click Add. Note: The client ID will not be able to access the API resources after the client secret expires. You must renew the client secret to keep the client ID active.
Copy and save the Secret Value. It will be required to build the integration connection in D3 SOAR connection. Note: The created Client Secret can only be viewed once. Store it in a secure location before leaving the page.
Configure the API permissions. Click API permissions on the left navigation menu, then + Add a permission. Select Microsoft Graph, then search and select the required Application permissions. After selecting the required permissions, click Add permissions. See Permission Requirements for the required permissions for each command in this integration.
Some permissions may need to be granted admin consent for your directory (d3uat in the sample screenshot) to use. Ensure Grant admin consent for <Your Directory> is checked.
You may see Not granted for <Your Directory> in the status column. Those are the ungranted permissions you want to use. After successfully granting permissions, a green checkmark will appear under the permission status column for the corresponding permissions. If your login account does not have admin privileges, ask your admin to grant consent.
Configuring D3 SOAR to Work with Microsoft Entra ID Protection
Log in to D3 SOAR.
Find the Microsoft Entra ID Protection integration.
Navigate to Configuration on the top header menu.
Click on the Integration icon on the left sidebar.
Type Microsoft Entra ID Protection in the search box to find the integration, then click it to select it.
Click + Connection, on the right side of the Connections section. A new connection window will appear.
Configure the following fields to create a connection to Microsoft Entra ID Protection.
Connection Name: The desired name for the connection.
Site: Specifies the site to use the integration connection. Use the drop-down menu to select the site. The Share to Internal Sites option enables all sites defined as internal sites to use the connection. Selecting a specific site will only enable that site to use the connection.
Recipient site for events from connections Shared to Internal Sites: This field appears if you selected Share to Internal Sites for Site to let you select the internal site to deploy the integration connection.
Agent Name (Optional): Specifies the proxy agent required to build the connection. Use the dropdown menu to select the proxy agent from a list of previously configured proxy agents.
Description (Optional): Add your desired description for the connection.
Configure User Permissions: Defines which users have access to the connection.
Active: Check the tick box to ensure the connection is available for use.
System: This section contains the parameters defined specifically for the integration. These parameters must be configured to create the integration connection.
1. Input the Auth URL. The input URL is https://login.microsoftonline.com/{<tenant_id>}/oauth2/v2.0/token. Replace <tenant_id> with your tenant ID. See step 5 of Configuring Microsoft Entra ID Protection to Work with D3 SOAR for instructions on obtaining the tenant ID.
2. Input the API version. The default value is v1.0.
3. Input the saved Client ID. See step 5 of Configuring Microsoft Entra ID Protection to Work with D3 SOAR.
4. Input the saved Client Secret. See step 5 of Configuring Microsoft Entra ID Protection to Work with D3 SOAR for instructions on obtaining the tenant ID.
Note: The Grant Type and Scope parameters do not require an input. The default values are fixed in order for the connection to pass.Connection Health Check: Updates the connection status you have created. A connection health check is done by scheduling the Test Connection command of this integration. This can only be done when the connection is active.
To set up a connection health check, check the Connection Health Check tickbox. You can customize the interval (minutes) for scheduling the health check. An email notification can be set up after a specified number of failed connection attempts.Enable Password Vault: An optional feature that allows users to take the stored credentials from their own password vault. Please refer to the password vault connection guide if needed.
Test the connection.
Click Test Connection to verify the account credentials and network connection. If the Test Connection Passed alert window appears, the test connection is successful. You will see Passed with a green checkmark appear beside the Test Connection button. If the test connection fails, please check your connection parameters and try again.
Click OK to close the alert window.
Click + Add to create and add the configured connection.
Commands
Microsoft Entra ID Protection includes the following executable commands for users to set up schedules or create playbook workflows. With the Test Command, you can execute these commands independently for playbook troubleshooting.
Integration API Note
For more information about the Microsoft Entra ID Protection API, please refer to the Microsoft Entra ID Protection API reference.
Reader Note
Certain permissions are required for each command. Please refer to the Permission Requirements and Configuring Microsoft Entra ID Protection to Work with D3 SOAR for details.
Confirm Compromised
Confirms one or more riskyUser objects as compromised. This action sets the targeted user's risk level to high.
Reader Note
The parameter User IDs is required to run this command.
Run the List Risky Users command to obtain User IDs. The User IDs can be found under path $.value.[*].id in the returned raw data.
Input
Input Parameter | Required /Optional | Description | Example |
User IDs | Required | The user IDs to confirm as compromised. User IDs can be obtained using the List Risky Users command. | [“**********************”] |
Output
Error Handling
If the Return Data is Partially Successful or Failed, an Error tab will appear in the Test Result window.
The error tab contains the details responded from D3 SOAR or third-party API calls, including Failure Indicator, Status Code, and Message. This can help you locate the root cause of a command failure.
Parts in Error | Description | Example |
Failure Indicator | Indicates the command failure that happened at a specific input and/or API call. | Confirm Compromised failed. |
Status Code | The response code issued by the third-party API server or the D3 SOAR system that can be used to locate the corresponding error category. For example, if the returned status code is 401, the selected connection is unauthorized to run the command. The user or system support would need to check the permission setting in the Microsoft Entra ID Protection portal. Refer to the HTTP Status Code Registry for details. | Status Code: 404. |
Message | The raw data or captured key error message from the integration API server about the API request failure. | Message: User IDs Not Found. |
Error Sample Data Confirm Compromised failed. Status Code: 404. Message: User IDs Not Found. |
Dismiss Risky User
Dismisses the risk of one or more riskyUser objects. This action sets the targeted user's risk level to none.
Reader Note
Input parameter User IDs is required to run this command.
Run the List Risky Users command to obtain User IDs. The User IDs can be found under path $.value.[*].id in the returned raw data.
Input
Input Parameter | Required /Optional | Description | Example |
User IDs | Required | The user IDs to dismiss. User IDs can be obtained using the List Risky Users command. | [“**********************”] |
Output
Error Handling
If the Return Data is Partially Successful or Failed, an Error tab will appear in the Test Result window.
The error tab contains the details responded from D3 SOAR or third-party API calls, including Failure Indicator, Status Code, and Message. This can help you locate the root cause of a command failure.
Parts in Error | Description | Example |
Failure Indicator | Indicates the command failure that happened at a specific input and/or API call. | Dismiss Risky User failed. |
Status Code | The response code issued by the third-party API server or the D3 SOAR system that can be used to locate the corresponding error category. For example, if the returned status code is 401, the selected connection is unauthorized to run the command. The user or system support would need to check the permission setting in the Microsoft Entra ID Protection portal. Refer to the HTTP Status Code Registry for details. | Status Code: 404. |
Message | The raw data or captured key error message from the integration API server about the API request failure. | Message: User IDs Not Found. |
Error Sample Data Dismiss Risky User failed. Status Code: 404. Message: User IDs Not Found. |
List History
Retrieves historical information on the specified risky Users IDs.
Reader Note
Risky User ID is a required parameter to run this command.
Run the List Risky Users command to obtain Risky User IDs. The User IDs can be found under path $.value.[*].id in the returned raw data.
If only the Risk User Id parameter is defined, all historical information on the specified user will be returned.
Input
Input Parameter | Required /Optional | Description | Example |
Risky User ID | Required | The risky user ID to retrieve historical information. Risky User IDs can be obtained using the List Risky Users command. | ********************** |
Filter | Optional | The filter expression to filter results. Some available properties (including, but not limited to) are isDeleted, isProcessing, riskLevel, riskState, userDisplayName and userPrincipalName. See Use the $filter query parameter to filter a collection of objects - Microsoft Graph for more information about the available operators to use in the filter expression. Note: Syntax: The most common expression is <property> <operator> <value>. The and operator performs a logical conjunction on two or more statements. The or operator is a conditional operator used between statements to test the validity of each statement. | riskLevel eq 'low' |
Top | Optional | The page size of the returned results. | 1 |
Select | Optional | The filter properties to list in the returned results. The valid input properties are id, isDeleted, isProcessing, riskLevel, riskState, riskDetail, riskLastUpdatedDateTime, userDisplayName, userPrincipalName and userId. | id |
Output
Error Handling
If the Return Data is Failed, an Error tab will appear in the Test Result window.
The error tab contains the details responded from D3 SOAR or third-party API calls, including Failure Indicator, Status Code, and Message. This can help you locate the root cause of a command failure.
Parts in Error | Description | Example |
Failure Indicator | Indicates the command failure that happened at a specific input and/or API call. | List History failed. |
Status Code | The response code issued by the third-party API server or the D3 SOAR system that can be used to locate the corresponding error category. For example, if the returned status code is 401, the selected connection is unauthorized to run the command. The user or system support would need to check the permission setting in the Microsoft Entra ID Protection portal. Refer to the HTTP Status Code Registry for details. | Status Code: 400. |
Message | The raw data or captured key error message from the integration API server about the API request failure. | Message: Invalid filter clause. |
Error Sample Data List History failed. Status Code: 400. Message: Invalid filter clause |
List Risk Detections
Retrieves a list of the riskDetection objects and their properties.
Reader Note
All Risk detections will be returned if no input is defined.
Input
Input Parameter | Required /Optional | Description | Example |
Filter | Optional | The filter expression to filter results. Note: Syntax: The most common expression is <property> <operator> <value>. Properties: See riskDetection resource type - Microsoft Graph v1.0 for more information about the available properties. Operators: See Use the $filter query parameter to filter a collection of objects - Microsoft Graph for more information about the available operators to use in the filter expression. The and operator performs a logical conjunction on two or more statements. The or operator is a conditional operator used between statements to test the validity of each statement. Different operators are supported for different properties, please check the valid operators to use. | detectionTimingType eq 'offline' |
Top | Optional | The page size of the returned results. | 1 |
Select | Optional | The filter properties to list in the returned results. The valid input properties are id, isDeleted, isProcessing, riskLevel, riskState, riskDetail, riskLastUpdatedDateTime, userDisplayName and userPrincipalName. | id |
Output
Error Handling
If the Return Data is Failed, an Error tab will appear in the Test Result window.
The error tab contains the details responded from D3 SOAR or third-party API calls, including Failure Indicator, Status Code, and Message. This can help you locate the root cause of a command failure.
Parts in Error | Description | Example |
Failure Indicator | Indicates the command failure that happened at a specific input and/or API call. | List Risk Detections failed. |
Status Code | The response code issued by the third-party API server or the D3 SOAR system that can be used to locate the corresponding error category. For example, if the returned status code is 401, the selected connection is unauthorized to run the command. The user or system support would need to check the permission setting in the Microsoft Entra ID Protection portal. Refer to the HTTP Status Code Registry for details. | Status Code: 400. |
Message | The raw data or captured key error message from the integration API server about the API request failure. | Message: Invalid filter clause. |
Error Sample Data List Risk Detections failed. Status Code: 400. Message: Invalid filter clause. |
List Risky Users
Retrieves a list of the riskyUser objects and their properties.
Reader Note
All Risky users will be returned if no input is defined.
Input
Input Parameter | Required /Optional | Description | Example |
Filter | Optional | The filter expression to filter results. Note: Syntax: The most common expression is <property> <operator> <value>. Properties: See riskyUser resource type - Microsoft Graph v1.0 for more information about the available properties. Operators: See Use the $filter query parameter to filter a collection of objects - Microsoft Graph for more information about the available operators to use in the filter expression. The and operator performs a logical conjunction on two or more statements. The or operator is a conditional operator used between statements to test the validity of each statement. Different operators are supported for different properties, please check the valid operators to use. | riskLevel eq 'high' |
Top | Optional | The page size of the returned results. | 1 |
Select | Optional | The filter properties to list in the returned results. The valid input properties are id, isDeleted, isProcessing, riskLevel, riskState, riskDetail, riskLastUpdatedDateTime, userDisplayName and userPrincipalName. | id |
Output
Error Handling
If the Return Data is Failed, an Error tab will appear in the Test Result window.
The error tab contains the details responded from D3 SOAR or third-party API calls, including Failure Indicator, Status Code, and Message. This can help you locate the root cause of a command failure.
Parts in Error | Description | Example |
Failure Indicator | Indicates the command failure that happened at a specific input and/or API call. | List Risky Users failed. |
Status Code | The response code issued by the third-party API server or the D3 SOAR system that can be used to locate the corresponding error category. For example, if the returned status code is 401, the selected connection is unauthorized to run the command. The user or system support would need to check the permission setting in the Microsoft Entra ID Protection portal. Refer to the HTTP Status Code Registry for details. | Status Code: 400. |
Message | The raw data or captured key error message from the integration API server about the API request failure. | Message: Invalid filter clause. |
Error Sample Data List Risky Users failed. Status Code: 400. Message:Invalid filter clause. |
List Sign-In
Retrieves the Microsoft Entra ID user sign-ins for your tenant. Sign-ins that are interactive in nature (where a username/password is passed as part of auth token) and successful federated sign-ins are currently included in the sign-in logs.
Reader Note
All sign-ins will be returned if no input is defined.
Input
Input Parameter | Required /Optional | Description | Example |
Filter | Optional | The filter expression to filter results. Note: Syntax: The most common expression is <property> <operator> <value>. Properties: See signIn resource type - Microsoft Graph v1.0 for more information about the available properties. Operators: See Use the $filter query parameter to filter a collection of objects - Microsoft Graph for more information about the available operators to use in the filter expression. The and operator performs a logical conjunction on two or more statements. The or operator is a conditional operator used between statements to test the validity of each statement. Different operators are supported for different properties, please check the valid operators to use. | appDisplayName eq 'powerbIlab' |
Top | Optional | The page size of the returned results. | 1 |
Output
Error Handling
If the Return Data is Failed, an Error tab will appear in the Test Result window.
The error tab contains the details responded from D3 SOAR or third-party API calls, including Failure Indicator, Status Code, and Message. This can help you locate the root cause of a command failure.
Parts in Error | Description | Example |
Failure Indicator | Indicates the command failure that happened at a specific input and/or API call. | List Sign-In failed. |
Status Code | The response code issued by the third-party API server or the D3 SOAR system that can be used to locate the corresponding error category. For example, if the returned status code is 401, the selected connection is unauthorized to run the command. The user or system support would need to check the permission setting in the Microsoft Entra ID Protection portal. Refer to the HTTP Status Code Registry for details. | Status Code: 400. |
Message | The raw data or captured key error message from the integration API server about the API request failure. | Message: Invalid filter clause. |
Error Sample Data List Sign-In failed. Status Code: 400. Message: Invalid filter clause. |
Test Connection
Allows you to perform a health check on an integration connection. You can schedule a periodic health check by selecting Connection Health Check when editing an integration connection.
Input
N/A
Output
Error Handling
If the Return Data is failed, an Error tab will appear in the Test Result window.
The error tab contains the responses from the third-party API calls including Failure Indicator, Status Code, and Message. This can help you locate the root cause of a command failure.
Parts in Error | Description | Example |
Failure Indicator | Indicates the command failure that happened at a specific input and/or API call. | Test Connection failed. Failed to check the connector. |
Status Code | The response code issued by the third-party API server or the D3 SOAR system that can be used to locate the corresponding error category. For example, if the returned status code is 401, the selected connection is unauthorized to run the command. The user or system support would need to check the permission setting in the Microsoft Entra ID Protection portal. Refer to the HTTP Status Code Registry for details. | Status Code: 400. |
Message | The raw data or captured key error message from the integration API server about the API request failure. | Message: unauthorized_client. |
Error Sample Data Test Connection failed. Failed to check the connector. Status Code: 400. Message: unauthorized_client. |