risky_service_principals
Creates, updates, deletes, gets or lists a risky_service_principals resource.
Overview
| Name | risky_service_principals |
| Type | Resource |
| Id | entra_id.identity_protection.risky_service_principals |
Fields
The following fields are returned by SELECT queries:
- get
- list
Retrieved navigation property
| Name | Datatype | Description |
|---|---|---|
id | string | The unique identifier for an entity. Read-only. |
appId | string | The globally unique identifier for the associated application (its appId property), if any. |
displayName | string | The display name for the service principal. |
history | array | Represents the risk history of Microsoft Entra service principals. |
isEnabled | boolean | true if the service principal account is enabled; otherwise, false. |
isProcessing | boolean | Indicates whether Microsoft Entra ID is currently processing the service principal's risky state. |
riskDetail | | Details of the detected risk. Note: Details for this property are only available for Workload Identities Premium customers. Events in tenants without this license will be returned hidden. |
riskLastUpdatedDateTime | string (date-time) | The date and time that the risk state was last updated. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2021 is 2021-01-01T00:00:00Z. Supports $filter (eq). (pattern: ^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$) |
riskLevel | | Level of the detected risky workload identity. The possible values are: low, medium, high, hidden, none, unknownFutureValue. Supports $filter (eq). |
riskState | | State of the service principal's risk. The possible values are: none, confirmedSafe, remediated, dismissed, atRisk, confirmedCompromised, unknownFutureValue. |
servicePrincipalType | string | Identifies whether the service principal represents an Application, a ManagedIdentity, or a legacy application (socialIdp). This is set by Microsoft Entra ID internally and is inherited from servicePrincipal. |
Retrieved collection
| Name | Datatype | Description |
|---|---|---|
id | string | The unique identifier for an entity. Read-only. |
appId | string | The globally unique identifier for the associated application (its appId property), if any. |
displayName | string | The display name for the service principal. |
history | array | Represents the risk history of Microsoft Entra service principals. |
isEnabled | boolean | true if the service principal account is enabled; otherwise, false. |
isProcessing | boolean | Indicates whether Microsoft Entra ID is currently processing the service principal's risky state. |
riskDetail | | Details of the detected risk. Note: Details for this property are only available for Workload Identities Premium customers. Events in tenants without this license will be returned hidden. |
riskLastUpdatedDateTime | string (date-time) | The date and time that the risk state was last updated. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2021 is 2021-01-01T00:00:00Z. Supports $filter (eq). (pattern: ^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$) |
riskLevel | | Level of the detected risky workload identity. The possible values are: low, medium, high, hidden, none, unknownFutureValue. Supports $filter (eq). |
riskState | | State of the service principal's risk. The possible values are: none, confirmedSafe, remediated, dismissed, atRisk, confirmedCompromised, unknownFutureValue. |
servicePrincipalType | string | Identifies whether the service principal represents an Application, a ManagedIdentity, or a legacy application (socialIdp). This is set by Microsoft Entra ID internally and is inherited from servicePrincipal. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | risky_service_principal_id | Read the properties and relationships of a riskyServicePrincipal object. | |
list | select | Retrieve the properties and relationships of riskyServicePrincipal objects. | ||
insert | insert | |||
update | update | risky_service_principal_id | ||
delete | delete | risky_service_principal_id | If-Match | |
confirm_compromised | exec | Confirm one or more riskyServicePrincipal objects as compromised. This action sets the targeted service principal account's risk level to high. | ||
dismiss | exec | Dismiss the risk of one or more riskyServicePrincipal objects. This action sets the targeted service principal account's risk level to none. You can dismiss up to 60 service principal accounts in one request. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
risky_service_principal_id | string | The unique identifier of riskyServicePrincipal |
If-Match | string | ETag |
SELECT examples
- get
- list
Read the properties and relationships of a riskyServicePrincipal object.
SELECT
id,
appId,
displayName,
history,
isEnabled,
isProcessing,
riskDetail,
riskLastUpdatedDateTime,
riskLevel,
riskState,
servicePrincipalType
FROM entra_id.identity_protection.risky_service_principals
WHERE risky_service_principal_id = '{{ risky_service_principal_id }}' -- required
;
Retrieve the properties and relationships of riskyServicePrincipal objects.
SELECT
id,
appId,
displayName,
history,
isEnabled,
isProcessing,
riskDetail,
riskLastUpdatedDateTime,
riskLevel,
riskState,
servicePrincipalType
FROM entra_id.identity_protection.risky_service_principals
;
INSERT examples
- insert
- Manifest
No description available.
INSERT INTO entra_id.identity_protection.risky_service_principals (
id,
appId,
displayName,
isEnabled,
isProcessing,
riskDetail,
riskLastUpdatedDateTime,
riskLevel,
riskState,
servicePrincipalType,
history
)
SELECT
'{{ id }}',
'{{ appId }}',
'{{ displayName }}',
{{ isEnabled }},
{{ isProcessing }},
'{{ riskDetail }}',
'{{ riskLastUpdatedDateTime }}',
'{{ riskLevel }}',
'{{ riskState }}',
'{{ servicePrincipalType }}',
'{{ history }}'
RETURNING
id,
appId,
displayName,
history,
isEnabled,
isProcessing,
riskDetail,
riskLastUpdatedDateTime,
riskLevel,
riskState,
servicePrincipalType
;
# Description fields are for documentation purposes
- name: risky_service_principals
props:
- name: id
value: "{{ id }}"
description: |
The unique identifier for an entity. Read-only.
- name: appId
value: "{{ appId }}"
description: |
The globally unique identifier for the associated application (its appId property), if any.
- name: displayName
value: "{{ displayName }}"
description: |
The display name for the service principal.
- name: isEnabled
value: {{ isEnabled }}
description: |
true if the service principal account is enabled; otherwise, false.
- name: isProcessing
value: {{ isProcessing }}
description: |
Indicates whether Microsoft Entra ID is currently processing the service principal's risky state.
- name: riskDetail
value: "{{ riskDetail }}"
description: |
Details of the detected risk. Note: Details for this property are only available for Workload Identities Premium customers. Events in tenants without this license will be returned hidden.
- name: riskLastUpdatedDateTime
value: "{{ riskLastUpdatedDateTime }}"
description: |
The date and time that the risk state was last updated. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2021 is 2021-01-01T00:00:00Z. Supports $filter (eq).
- name: riskLevel
value: "{{ riskLevel }}"
description: |
Level of the detected risky workload identity. The possible values are: low, medium, high, hidden, none, unknownFutureValue. Supports $filter (eq).
- name: riskState
value: "{{ riskState }}"
description: |
State of the service principal's risk. The possible values are: none, confirmedSafe, remediated, dismissed, atRisk, confirmedCompromised, unknownFutureValue.
- name: servicePrincipalType
value: "{{ servicePrincipalType }}"
description: |
Identifies whether the service principal represents an Application, a ManagedIdentity, or a legacy application (socialIdp). This is set by Microsoft Entra ID internally and is inherited from servicePrincipal.
- name: history
description: |
Represents the risk history of Microsoft Entra service principals.
value:
- id: "{{ id }}"
appId: "{{ appId }}"
displayName: "{{ displayName }}"
isEnabled: {{ isEnabled }}
isProcessing: {{ isProcessing }}
riskDetail: "{{ riskDetail }}"
riskLastUpdatedDateTime: "{{ riskLastUpdatedDateTime }}"
riskLevel: "{{ riskLevel }}"
riskState: "{{ riskState }}"
servicePrincipalType: "{{ servicePrincipalType }}"
history: "{{ history }}"
activity: "{{ activity }}"
initiatedBy: "{{ initiatedBy }}"
UPDATE examples
- update
No description available.
UPDATE entra_id.identity_protection.risky_service_principals
SET
id = '{{ id }}',
appId = '{{ appId }}',
displayName = '{{ displayName }}',
isEnabled = {{ isEnabled }},
isProcessing = {{ isProcessing }},
riskDetail = '{{ riskDetail }}',
riskLastUpdatedDateTime = '{{ riskLastUpdatedDateTime }}',
riskLevel = '{{ riskLevel }}',
riskState = '{{ riskState }}',
servicePrincipalType = '{{ servicePrincipalType }}',
history = '{{ history }}'
WHERE
risky_service_principal_id = '{{ risky_service_principal_id }}' --required
RETURNING
id,
appId,
displayName,
history,
isEnabled,
isProcessing,
riskDetail,
riskLastUpdatedDateTime,
riskLevel,
riskState,
servicePrincipalType;
DELETE examples
- delete
No description available.
DELETE FROM entra_id.identity_protection.risky_service_principals
WHERE risky_service_principal_id = '{{ risky_service_principal_id }}' --required
AND If-Match = '{{ If-Match }}'
;
Lifecycle Methods
- confirm_compromised
- dismiss
Confirm one or more riskyServicePrincipal objects as compromised. This action sets the targeted service principal account's risk level to high.
EXEC entra_id.identity_protection.risky_service_principals.confirm_compromised
@@json=
'{
"servicePrincipalIds": "{{ servicePrincipalIds }}"
}'
;
Dismiss the risk of one or more riskyServicePrincipal objects. This action sets the targeted service principal account's risk level to none. You can dismiss up to 60 service principal accounts in one request.
EXEC entra_id.identity_protection.risky_service_principals.dismiss
@@json=
'{
"servicePrincipalIds": "{{ servicePrincipalIds }}"
}'
;