AADSTS240004: Authorisation response did not contain a code
The authorisation response did not contain a code.
What to check
- Read the underlying error in the response and confirm the request uses
response_type=codewhere required.
Official reference
Microsoft Learn: AADSTS error codes
Microsoft error lookup
Message summary: The lookup includes the authorisation endpoint's underlying error when the response fails to return a code.
Fields in the message template: {errorInfo}.
Microsoft does not provide a separate remediation in the lookup.