For Azure Arc server onboarding with a service principal, AADSTS7000215: Invalid client secret is provided indicates the secret is wrong, invalid, or expired. For Azure Arc onboarding specifically, service principal logins also require the client ID and secret to be correct, unexpired, and from the same tenant where the server resource is created.
Use this recovery path:
- Create or reset the service principal secret.
- If the current secret expired or was revoked, generate a new client secret for the app registration.
- Copy the client secret value immediately and use that value in automation. Do not use the secret ID.
- Update every onboarding script and credential store that still uses the old secret.
- Replace the expired secret with the new client secret value anywhere the bulk Azure Arc onboarding scripts read credentials.
- If the secret is stored in a centralized configuration, update it there first so all deployments consume the same current value.
- Validate the service principal inputs used by Azure Arc onboarding.
- Confirm the client ID is correct.
- Confirm the client secret is the new value and has not expired.
- Confirm the service principal belongs to the same tenant where the Azure Arc-enabled server resource will be created.
- Re-run onboarding validation on a test server before restarting bulk deployment.
- If onboarding still fails, check whether the issue is actually connectivity rather than credentials.
- Run
azcmagent checkto verify required access to Microsoft Entra ID endpoints is not blocked by firewall or proxy.
- Resume bulk onboarding after one successful test.
- Once a test machine authenticates successfully, redeploy the updated scripts across the remaining servers.
Important operational notes:
- The onboarding credential is only needed when
azcmagent connectruns. If the onboarding credential expires later, servers that are already connected remain connected to Azure Arc. - To reduce recurrence risk, use certificates instead of secrets for Azure Arc service principals when possible, and regularly rotate credentials.
If the failing automation is Azure Arc Data Controller rather than Azure Arc-enabled servers, the credential must also be updated in the Kubernetes secret used by the data controller:
kubectl edit secret/upload-service-principal-secret -n <name of namespace>
Then replace the base64-encoded values for clientID, clientSecret, and/or tenantID as needed. Do not edit other properties.
References: