Your company has developed a multi-tenant software-as-a-service (SaaS) application registered in Microsoft Entra Tenant A. Several client organizations, including Tenant B, have consented to the application, which created a service principal for the application in each customer tenant. The application runs as a background daemon service and uses the client credentials flow with a client secret to access APIs in each customer's tenant. You need to rotate the client secret without causing service interruption or requiring the customers' administrators to perform any actions. Which of the following is the correct way to rotate the secret?
- Configure the new client secret on the application registration in Tenant A, update the daemon service to use the new secret, and then delete the expired secret from the application registration in Tenant A.Answer
- BCreate a new client secret on the service principal in Tenant B, update the daemon service instance targeting Tenant B with this new secret, and delete the old secret from the service principal in Tenant B.
- CAsk the Tenant B administrator to generate a new client secret on the consented service principal in Tenant B, retrieve the secret value, and update the daemon service configuration.
- DAdd a new client secret in the application registration in Tenant A, then request the Tenant B administrator to re-consent to the application so that the service principal in Tenant B synchronizes and registers the new secret.
Answer
Configure the new client secret on the application registration in Tenant A, update the daemon service to use the new secret, and then delete the expired secret from the application registration in Tenant A.
In a multi-tenant Microsoft Entra ID scenario, the global Application object (managed via the App Registration in the home tenant) holds the authentication credentials (secrets/certificates). The local Service Principals created in consumer tenants reference the global application object for authentication checks. To rotate credentials without downtime, you add a new secret to the App Registration in the home tenant, update your service to use it, and delete the old secret. No updates or admin intervention are required in the customer tenants.
Step-by-Step Solution
Key Concept
Multi-tenant application credentials management and the relationship between Application objects (App Registrations) and Service Principals.
Alternative Method
Instead of using client secrets, you can upload a client certificate to the application registration in Tenant A. For production environments, authenticating via a certificate stored securely in Azure Key Vault is the recommended practice for rotation and security compliance.
Estimated Time:3m 0s