Aşağıdaki istekler, Microsoft Graph API'sini kullanarak öneriyi ve etkilenen kaynakları almak için kullanılabilir. Microsoft Graph API'sini kullanmak için ve DirectoryRecommendations.Read.All
izinlerine ihtiyacınız vardırDirectoryRecommendations.ReadWrite.All
. Daha fazla bilgi için bkz . Kimlik Önerilerini kullanma.
Microsoft Graph kullanarak hizmet sorumlusu kimlik bilgilerini yenilerken, bir hizmet sorumlusuna parola kimlik bilgilerini almak, yeni bir parola kimlik bilgisi eklemek ve ardından eski kimlik bilgilerini kaldırmak için bir sorgu çalıştırmanız gerekir.
- Graph Explorer'da oturum açın.
- Açılan listeden HTTP yöntemi olarak GET'i seçin.
Kiracınız için tüm önerileri almak için:
GET https://graph.microsoft.com/beta/directory/recommendations
Yanıtta, aşağıdaki desenle eşleşen önerinin kimliğini bulun: {tenantId}_Microsoft.Identity.IAM.Insights.servicePrincipalKeyExpiry
.
Etkilenen kaynakları tanımlamak için:
GET https://graph.microsoft.com/beta/directory/recommendations/{tenantId}_Microsoft.Identity.IAM.Insights.servicePrincipalKeyExpiry
Kaynak listesini durumlarına göre filtrelemek için, örneğin yalnızca olarak active
işaretlenmiş kaynaklar:
https://graph.microsoft.com/beta/directory/recommendations/{tenantId}_Microsoft.Identity.IAM.Insights. servicePrincipalKeyExpiry/impactedResources?$filter=status eq Microsoft.Graph.recommendationStatus'active'
- Kaldırmak istediğiniz kimlik bilgilerinin ,
AppId
ve kaynağını not CredentialId
edin.
- Yeni bir parola veya anahtar kimlik bilgisi eklemek için şu Microsoft Graph API'lerini kullanın:
- Eski kimlik bilgilerini kaldırmak için şu Microsoft Graph API'lerini kullanın:
{
"id": "536279f6-15cc-45f2-be2d-61e352b51eef_Microsoft.Identity.IAM.Insights.ServicePrincipalKeyExpiry",
"recommendationType": "servicePrincipalKeyExpiry",
"createdDateTime": "2022-05-29T00:11:17Z",
"impactStartDateTime": "2022-05-29T00:11:17Z",
"postponeUntilDateTime": null,
"lastModifiedDateTime": "2024-07-26T12:31:58Z",
"lastModifiedBy": "System",
"displayName": "Renew expiring service principal credentials",
"featureAreas": [
"applications"
],
"insights": "Your tenant has service principals with credentials that will expire soon.",
"benefits": "Renewing the service principal credential(s) before expiration ensures the application continues to function and reduces the possibility of downtime due to an expired credential.",
"category": "identityBestPractice",
"status": "completedBySystem",
"priority": "high",
"requiredLicenses": "microsoftEntraWorkloadId",
"impactType": "apps",
"actionSteps": [
{
"stepNumber": 1,
"text": "1. Navigate to the Enterprise applications section and locate the Enterprise application for which the credential needs to be rotated."
},
{
"stepNumber": 2,
"text": "2. Navigate to the “Single sign-on” blade."
},
{
"stepNumber": 3,
"text": "3. Edit the 'SAML signing certificate' section and follow prompts to add a new certificate."
},
{
"stepNumber": 4,
"text": "4. After adding the certificate, change its properties to make certificate active. This will make the previous certificate inactive."
},
{
"stepNumber": 5,
"text": "5. Once the certificate is successfully added and activated, validate that your service is working with the new credential, and remove the old credential."
},
{
"stepNumber": 6,
"text": "6. If the service principal does not show any credentials after navigating to the enterprise apps blade, we recommend checking the 'passwordCredentials' and 'keyCredentials' property of the service principal object using PowerShell or Microsoft Graph service principal API and use the Microsoft Graph API to rotate credentials."
}
]
}