How to fix the "AADSTS90023: Invalid STS request" error in Microsoft Entra

Shameem Mohamed 10 Reputation points
2024-01-03T16:51:30.3033333+00:00

I am trying to implement the Native authentication REST API reference - email OTP with Entra, getting the "AADSTS90023: Invalid STS request" error with Bad request response code (400).User's image

Microsoft Security | Microsoft Entra | Microsoft Entra ID
Microsoft Security | Microsoft Entra | Other
{count} vote

2 answers

Sort by: Most helpful
  1. Navya 20,180 Reputation points Microsoft External Staff Moderator
    2024-01-09T09:28:22.4866667+00:00

    Hi @Shameem Mohamed

    Thank you for posting this in Microsoft Q&A.

    I understand you are trying to implement the Native authentication REST API reference - email OTP with Entra, getting the "AADSTS90023: Invalid STS request" error with Bad request response code (400).

    Basically, a 400 Bad Request error occurs when a request sent to the website server is incorrect or corrupt, and the server receiving the request cannot understand it.

    Here are a few things you can check to troubleshoot this issue:

    1.Verify that the request is being sent to the correct endpoint. The endpoint for the Native authentication REST API reference - email OTP with Entra is https://login.microsoftonline.com/enterpriseregistration.windows.net/enrollmentserver/issueotp. Make sure that the request is being sent to this endpoint.

    2.Verify that the user's email address is valid and that it is associated with a valid Entra account.

    3.Check that the request is properly formatted. The request should include the required parameters and headers.

    4.Check that the client application is properly registered in Azure Active Directory and that it has the necessary permissions to call the authentication service.

    Hope this helps. Do let us know if you any further queries.

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    Thanks,

    Navya.

    3 people found this answer helpful.

  2. M D 0 Reputation points
    2025-07-01T02:02:46.0833333+00:00

    Request Id: 30c5aec3-f334-4c61-bbe1-c158ae780600

    Correlation Id: 9266d2fe-1d4b-46b3-b848-581144659ff6

    Timestamp: 2025-07-01T01:57:37Z

    Message: AADSTS90023: An error occurred while processing incoming message.

    0 comments No comments

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.