riskyServicePrincipal resource type

Namespace: microsoft.graph

Represents Azure AD service principals that are at-risk. Azure AD continually evaluates service principal risk based on various signals and machine learning. This API provides programmatic access to all at-risk service principals in your Azure AD tenant.

Inherits from entity.

Note: Using the riskyServicePrincipal API requires a Workload Identities Premium license.


Method Return type Description
List riskyServicePrincipals riskyServicePrincipal collection List risky service principals and their risk properties.
Get riskyServicePrincipal riskyServicePrincipal Get a specific risky service principal and its risk properties.
dismiss None Dismiss the risk of a risky service principal.
confirmCompromised None Confirm a risky service principal as compromised.
List history riskyServicePrincipalHistoryItem collection Get the risk history of an Azure AD service principal.


Property Type Description
isEnabled Boolean true if the service principal account is enabled; otherwise, false.
appId String The globally unique identifier for the associated application (its appId property), if any.
displayName String The display name for the service principal.
id String The unique identifier assigned to the service principal at risk. Inherited from entity.
isProcessing Boolean Indicates whether Azure AD is currently processing the service principal's risky state.
riskDetail 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.
The possible values are: none, hidden, unknownFutureValue, adminConfirmedServicePrincipalCompromised, adminDismissedAllRiskForServicePrincipal. Note that you must use the Prefer: include-unknown-enum-members request header to get the following value(s) in this evolvable enum: adminConfirmedServicePrincipalCompromised , adminDismissedAllRiskForServicePrincipal.
riskLastUpdatedDateTime DateTimeOffset 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).
riskLevel riskLevel Level of the detected risky workload identity. The possible values are: low, medium, high, hidden, none, unknownFutureValue. Supports $filter (eq).
riskState 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 Azure AD internally and is inherited from servicePrincipal.


Relationship Type Description
history riskyServicePrincipalHistoryItem collection Represents the risk history of Azure AD service principals.

JSON representation

The following is a JSON representation of the resource.

  "@odata.type": "#microsoft.graph.riskyServicePrincipal",
  "id": "String (identifier)",
  "isEnabled": "Boolean",
  "isProcessing": "Boolean",
  "riskLastUpdatedDateTime": "String (timestamp)",
  "riskLevel": "String",
  "riskState": "String",
  "riskDetail": "String",
  "displayName": "String",
  "appId": "String",
  "servicePrincipalType": "String"