Hi, AADSTS7000215 = The secret you are sending is not the correct one (or is not in the correct format). Quick checklist to fix: Use the client secret value (the string shown only once), not the Secret ID; if you no longer have it, regenerate a new secret in App registrations → Your app → Certificates & secrets and paste its value. Make sure you use the correct Application (client) ID (not the Object ID) and the same tenant/authority as your app: avoid common/organizations, point to https://login.microsoftonline.com/<tenant-id>/oauth2/v2.0/token. Verify that the secret has not expired and that the server time is not skewed. Send the request as application/x-www-form-urlencoded and URL-encode the client_secret; no JSON body, no quotes or newlines from env/Key Vault (trim!). Don't mix methods: if you're using a certificate, don't send a client_secret but a signed client_assertion; if you're using a secret, don't send an assertion. Minimal example (client credentials, v2): client_id=<appId>&client_secret=<secretValue>&grant_type=client_credentials&scope=<resource>/.default. If it's a Managed Application or there's multi-tenant use, verify that you're authenticating in the tenant where the app registration resides and that the secret belongs to that app, not the Enterprise Application. After regenerating the secret and correcting the endpoint/format, the error disappears 99% of the time.
Azure AD rejected my authentication request
Amritesh Singh
0
Reputation points
AADSTS7000215: Invalid client secret provided. Ensure the secret being sent in the request is the client secret value, not the client secret ID, for a secret added to app 'xxxxxxxxxxxxxxxxxxxx'. Trace ID: xxxxxxxxxxxxxxxxx Correlation ID: xxxxxxxxxxxxxxxxxxxxxxxxxxx Timestamp: 2025-09-04 05:45:
Azure Managed Applications
Azure Managed Applications
An Azure service that enables managed service providers, independent software vendors, and enterprise IT teams to deliver turnkey solutions through the Azure Marketplace or service catalog.