GET https://graph.microsoft.com/beta/directory/recommendations/{tenantId}_Microsoft.Identity.IAM.Insights.StaleAppCreds
若要根据资源的状态筛选资源(例如 活动 资源):
GET https://graph.microsoft.com/eta/directory/recommendations/536279f6-15cc-45f2-be2d-61e352b51eef_Microsoft.Identity.IAM.Insights.StaleAppCreds/impactedResources?$filter=status eq Microsoft.Graph.recommendationStatus'active'
{
"id": "536279f6-15cc-45f2-be2d-61e352b51eef_Microsoft.Identity.IAM.Insights.StaleAppCreds",
"recommendationType": "staleAppCreds",
"createdDateTime": "2022-09-07T21:25:36Z",
"impactStartDateTime": "2022-09-07T21:25:36Z",
"postponeUntilDateTime": null,
"lastModifiedDateTime": "2024-07-22T15:23:29Z",
"lastModifiedBy": "System",
"displayName": "Remove unused credentials from applications",
"featureAreas": [
"applications"
],
"insights": "Your tenant has applications with credentials which have not been used in more than 30 days.",
"benefits": "An application credential is used to get a token that grants access to a resource or another service.",
"category": "identityBestPractice",
"status": "active",
"priority": "medium",
"releaseType": "preview",
"requiredLicenses": "microsoftEntraWorkloadId",
"impactType": "apps",
"actionSteps": [
{
"stepNumber": 1,
"text": "1. For application resources, navigate to the app registration section in your tenant."
},
{
"stepNumber": 2,
"text": "2. In the ‘Certificate and Secrets’ blade, find the credential and remove it."
},
{
"stepNumber": 3,
"text": "3. To remove a credential from a service principal resource, use the MS Graph Service Principal API service action ",
"actionUrl": {
"displayName": "`removePassword`",
"url": "https://docs.microsoft.com/graph/api/serviceprincipal-removepassword?view=graph-rest-1.0&tabs=http"
}
}
]
}