Two of our users are getting the AADSTS165000 error page when signing in at portal.office.com

ACollingwood 0 Reputation points
2025-05-09T11:25:16.7933333+00:00

Hope this may be the correct area to post this - it's a bit of a mad one!

Two of our users (a staff member and pupil) are getting the following error when signing in to portal.office.com, OneDrive, or SharePoint on their iPad's browser...

AADSTS165000: Invalid Request: (The user session context is missing. One or more of the user context values (cookies; form fields; headers) were not supplied, every request must include these values and maintain them across a complete single user flow.

When I look at the sign-in logs against either user and find the sign-in failure, the error code I get is 399218.

This error appears to only happen on iPads (we've tested multiple iPads, too), and on both our Smoothwall Browser (based on Safari) and Google Chrome. No matter whether we clear the browser cache completely, fully wipe the iPad, or try private browsing, the error still persists.

Interestingly, when I sign in as a user that isn't having issues, then sign them out and sign the problematic user in, it works. I'm at a total loss as to what's causing the issue. There's no discernible difference between the working pupil account and the non-working account, either!

Microsoft Security | Microsoft Entra | Microsoft Entra ID

2 answers

Sort by: Most helpful
  1. 𝑵𝒆𝒔𝒔𝒂 🌻 0 Reputation points
    2026-07-02T03:14:14.3766667+00:00

    Tengo o tenía el mismo error en mi iPad, no me dejaba entrar ni con mi cuenta de Google a Duolingo, ni con mi cuenta de Outlook a Teams, pero lo que me funcionó fue cambiar la Fecha y Hora de mi iPad por "set automatically" y mágicamente me dejó iniciar sesión en ambas, igual debes dejar habilitadas las cookies

    Was this answer helpful?

    0 comments No comments

  2. Anonymous
    2025-05-12T07:48:33.0766667+00:00

    Hello ACollingwood,

    We understand that few users are getting AADSTS165000 - Invalid request error while accessing Office applications.

    And this issue is happening only while using iPads with Smoothwall browser and Google chrome.

    You are able to access applications on the same platform and effected users are able to access when they sign-in after your activity.

    This happens on iPad browsers as they fail to maintain session cookies during authentication flow. But in your case few users are able to access and issue is only with few users.

    And let us know the behavior when the effected user tries to access through Edge browser instead of Safari.

    And I request you to exclude the below Microsoft URLs from SmoothWall content filtering.

    login.microsoftonline.com

    login.live.com

    *.office.com

    *.microsoft.com

    *.sharepoint.com

    Please let me now if you have same kind of permissions on the device as other two users. (Do you have administrator permission on the device, and they have only user level permission)

    Was this answer helpful?


Your answer

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