Skip to main content

risky_service_principals_history

Creates, updates, deletes, gets or lists a risky_service_principals_history resource.

Overview

Namerisky_service_principals_history
TypeResource
Identra_id.identity_protection.risky_service_principals_history

Fields

The following fields are returned by SELECT queries:

Retrieved navigation property

NameDatatypeDescription
idstringThe unique identifier for an entity. Read-only.
activityThe activity related to service principal risk level change.
appIdstringThe globally unique identifier for the associated application (its appId property), if any.
displayNamestringThe display name for the service principal.
historyarrayRepresents the risk history of Microsoft Entra service principals.
initiatedBystringThe identifier of the actor of the operation.
isEnabledbooleantrue if the service principal account is enabled; otherwise, false.
isProcessingbooleanIndicates whether Microsoft Entra ID is currently processing the service principal's risky state.
riskDetailDetails 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.
riskLastUpdatedDateTimestring (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])$)
riskLevelLevel of the detected risky workload identity. The possible values are: low, medium, high, hidden, none, unknownFutureValue. Supports $filter (eq).
riskStateState of the service principal's risk. The possible values are: none, confirmedSafe, remediated, dismissed, atRisk, confirmedCompromised, unknownFutureValue.
servicePrincipalTypestringIdentifies 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:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectrisky_service_principal_id, risky_service_principal_history_item_idRepresents the risk history of Microsoft Entra service principals.
listselectrisky_service_principal_idGet the risk history of a riskyServicePrincipal object.
insertinsertrisky_service_principal_id
updateupdaterisky_service_principal_id, risky_service_principal_history_item_id
deletedeleterisky_service_principal_id, risky_service_principal_history_item_idIf-Match

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.

NameDatatypeDescription
risky_service_principal_history_item_idstringThe unique identifier of riskyServicePrincipalHistoryItem
risky_service_principal_idstringThe unique identifier of riskyServicePrincipal
If-MatchstringETag

SELECT examples

Represents the risk history of Microsoft Entra service principals.

SELECT
id,
activity,
appId,
displayName,
history,
initiatedBy,
isEnabled,
isProcessing,
riskDetail,
riskLastUpdatedDateTime,
riskLevel,
riskState,
servicePrincipalType
FROM entra_id.identity_protection.risky_service_principals_history
WHERE risky_service_principal_id = '{{ risky_service_principal_id }}' -- required
AND risky_service_principal_history_item_id = '{{ risky_service_principal_history_item_id }}' -- required
;

INSERT examples

No description available.

INSERT INTO entra_id.identity_protection.risky_service_principals_history (
id,
appId,
displayName,
isEnabled,
isProcessing,
riskDetail,
riskLastUpdatedDateTime,
riskLevel,
riskState,
servicePrincipalType,
history,
activity,
initiatedBy,
risky_service_principal_id
)
SELECT
'{{ id }}',
'{{ appId }}',
'{{ displayName }}',
{{ isEnabled }},
{{ isProcessing }},
'{{ riskDetail }}',
'{{ riskLastUpdatedDateTime }}',
'{{ riskLevel }}',
'{{ riskState }}',
'{{ servicePrincipalType }}',
'{{ history }}',
'{{ activity }}',
'{{ initiatedBy }}',
'{{ risky_service_principal_id }}'
RETURNING
id,
activity,
appId,
displayName,
history,
initiatedBy,
isEnabled,
isProcessing,
riskDetail,
riskLastUpdatedDateTime,
riskLevel,
riskState,
servicePrincipalType
;

UPDATE examples

No description available.

UPDATE entra_id.identity_protection.risky_service_principals_history
SET
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 }}'
WHERE
risky_service_principal_id = '{{ risky_service_principal_id }}' --required
AND risky_service_principal_history_item_id = '{{ risky_service_principal_history_item_id }}' --required
RETURNING
id,
activity,
appId,
displayName,
history,
initiatedBy,
isEnabled,
isProcessing,
riskDetail,
riskLastUpdatedDateTime,
riskLevel,
riskState,
servicePrincipalType;

DELETE examples

No description available.

DELETE FROM entra_id.identity_protection.risky_service_principals_history
WHERE risky_service_principal_id = '{{ risky_service_principal_id }}' --required
AND risky_service_principal_history_item_id = '{{ risky_service_principal_history_item_id }}' --required
AND If-Match = '{{ If-Match }}'
;