Access has been blocked by Conditional Access policies

Holly Y L HE 0 Reputation points
2024-02-23T02:38:39.4466667+00:00

Hi, We can successfully call the login URL below in our local to get token. But while we run the same curl with same tenant id, client id, client secret in our GCP cloud container platform, we got error AADSTS53003: Access has been blocked by Conditional Access policies. Can you help?

curl --location --request GET 'https://login.microsoftonline.com/<TENANT ID>/oauth2/v2.0/token'
--header 'Content-Type: application/x-www-form-urlencoded'
--data-urlencode 'client_id=xxx'
--data-urlencode 'client_secret=xxx'
--data-urlencode 'grant_type=client_credentials'
--data-urlencode 'scope=https://org46f6c216.crm5.dynamics.com/.default' ERROR: {"error":"invalid_grant","error_description":"AADSTS53003: Access has been blocked by Conditional Access policies. The access policy does not allow token issuance. Trace ID: ecdfed35-200f-4348-a45a-1a5f2bbf4400 Correlation ID: 519e42fd-067d-4cb1-bb66-66947cf277ab Timestamp: 2024-02-23 02:23:19Z","error_codes":[53003],"timestamp":"2024-02-23 02:23:19Z","trace_id":"ecdfed35-200f-4348-a45a-1a5f2bbf4400","correlation_id":"519e42fd-067d-4cb1-bb66-66947cf277ab","error_uri":"https://login.microsoftonline.com/error?code=53003","suberror":"message_only","claims":"{"access_token":{"capolids":{"essential":true,"values":["75dcd255-50a9-4c8a-ab9f-b9ef773dacfe"]}}}"}

Access
Access
A family of Microsoft relational database management systems designed for ease of use.
400 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.