ESC
Type to search...

IdentityRiskyServicePrincipal.Read.All

Export JSON
Export CSV
Copy URL
Print
ApplicationDelegated Read All Resources

Allows the app to read all risky service principal information for your organization, without a signed-in user.

Permission data: April 6, 2026 at 4:06 AM UTC
Delegated Access App-Only Access

Permission Details

Application Permission

Read all identity risky service principal information

Allows the app to read all risky service principal information for your organization, without a signed-in user.

Delegated Permission Admin consent required

Read all identity risky service principal information

Allows the app to read all identity risky service principal information for your organization, on behalf of the signed-in user.

Properties

Microsoft Graph v1.0 endpoint-derived-docs

Properties is shown from stable Microsoft Graph v1.0 metadata.

Property Type Description
appId StringNullable The globally unique identifier for the associated application (its appId property), if any.
displayName StringNullable The display name for the service principal.
id String The unique identifier assigned to the service principal at risk. Inherited from entity.
isEnabled BooleanNullable true if the service principal account is enabled; otherwise, false.
isProcessing BooleanNullable Indicates whether Microsoft Entra ID 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.
riskLastUpdatedDateTime DateTimeOffsetNullable 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 StringNullable 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.
history riskyServicePrincipalHistoryItem collection Represents the risk history of Microsoft Entra service principals.

JSON Representation

Microsoft Graph v1.0 endpoint-derived-docs

JSON representation is shown from stable Microsoft Graph v1.0 metadata.

JSON representation
{
  "@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"
}

Relationships

Microsoft Graph v1.0 endpoint-derived-docs

Relationships is shown from stable Microsoft Graph v1.0 metadata.

Relationship Type Description
history riskyServicePrincipalHistoryItem collection Represents the risk history of Microsoft Entra service principals.

Graph Methods

Delegated access App-only access
Exact Microsoft Learn match

Microsoft Graph v1.0 endpoints are mapped directly from refreshed Microsoft Learn permissions tables.

Methods
GET /identityProtection/riskyServicePrincipals
GET /identityProtection/riskyServicePrincipals/{riskyServicePrincipalId}
GET /identityProtection/riskyServicePrincipals/{riskyServicePrincipalId}/history
Exact Microsoft Learn match

Microsoft Graph beta endpoints are mapped directly from refreshed Microsoft Learn permissions tables.

Methods
GET /identityProtection/riskyServicePrincipals
GET /identityProtection/riskyServicePrincipals/{riskyServicePrincipalId}
GET /identityProtection/riskyServicePrincipals/{riskyServicePrincipalId}/history
Exact Microsoft Learn PowerShell match

Microsoft Graph PowerShell v1.0 commands are mapped directly from refreshed Microsoft Learn PowerShell snippets.

Commands
Get-MgRiskyServicePrincipal /identityProtection/riskyServicePrincipals
List riskyServicePrincipals
Get-MgRiskyServicePrincipal /identityProtection/riskyServicePrincipals/{riskyServicePrincipalId}
Get riskyServicePrincipal
Get-MgRiskyServicePrincipalHistory /identityProtection/riskyServicePrincipals/{riskyServicePrincipalId}/history
List history (risk history of riskyServicePrincipal)
Exact Microsoft Learn PowerShell match

Microsoft Graph PowerShell beta commands are mapped directly from refreshed Microsoft Learn PowerShell snippets.

Commands
Get-MgBetaRiskyServicePrincipal /identityProtection/riskyServicePrincipals
List riskyServicePrincipals
Get-MgBetaRiskyServicePrincipal /identityProtection/riskyServicePrincipals/{riskyServicePrincipalId}
Get riskyServicePrincipal
Get-MgBetaRiskyServicePrincipalHistory /identityProtection/riskyServicePrincipals/{riskyServicePrincipalId}/history
List history (risk history of riskyServicePrincipal)

Code Examples

C# / .NET SDK
Get riskyServicePrincipal
// Code snippets are only available for the latest version. Current version is 5.x

// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.IdentityProtection.RiskyServicePrincipals["{riskyServicePrincipal-id}"].GetAsync();
JavaScript
Get riskyServicePrincipal
const options = {
	authProvider,
};

const client = Client.init(options);

let riskyServicePrincipal = await client.api('/identityProtection/riskyServicePrincipals/9089a539-a539-9089-39a5-899039a58990')
	.get();
PowerShell
Get riskyServicePrincipal
Import-Module Microsoft.Graph.Identity.SignIns

Get-MgRiskyServicePrincipal -RiskyServicePrincipalId $riskyServicePrincipalId
Python
Get riskyServicePrincipal
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python

result = await graph_client.identity_protection.risky_service_principals.by_risky_service_principal_id('riskyServicePrincipal-id').get()

App Registration

1

Navigate to Azure Portal

Go to App registrations in Microsoft Entra admin center

2

Add API Permission

Select your app → API permissions → Add a permission → Microsoft Graph

3

Select Permission Type

Choose Application permissions or delegated permissions and search for IdentityRiskyServicePrincipal.Read.All

4

Grant Admin Consent

Application permissions always require admin consent.