Share via

Cannot Login on iPhone

Ester Salman 0 Reputation points
2026-04-22T17:02:00.3866667+00:00

This is the error I get on my iPhone:

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.

Microsoft Edge | Profile, sync, and sign in | iOS
0 comments No comments

3 answers

Sort by: Most helpful
  1. EmilyS726 240.4K Reputation points Independent Advisor
    2026-04-22T17:36:29.54+00:00

    Hello

    What exactly are you logging into on your iPhone? A certain website? If so, what URL and is it via Edge?

    Or a certain app? If so, which app?

    Is this for an organization issued account?

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments

  2. Ester Salman 0 Reputation points
    2026-04-22T17:47:23.8066667+00:00

    What exactly are you logging into on your iPhone? Outlook Email app

    A certain website? If so, what URL and is it via Edge? No

    Or a certain app? If so, which app? Outlook

    Is this for an organization issued account? Personal MC 365 Account

    Was this answer helpful?


  3. AI answer

    2026-04-22T17:02:17.8366667+00:00

    The error indicates that required user session context (cookies, form fields, or headers) is not being preserved between requests on the iPhone. This typically happens when the browser or embedded web view used for sign-in does not allow cookies or does not share them correctly.

    For iOS sign-in flows that rely on Microsoft identity (including Microsoft 365 and Entra ID–backed apps), the sign-in experience depends on cookies being stored and reused to maintain a single user flow. If cookies are blocked, cleared, or isolated between requests, the service treats each request as a new session and fails with an error like AADSTS165000.

    To address this on iOS:

    1. Ensure that the browser or web view used for sign-in allows cookies and does not block them for Microsoft domains.
    2. Avoid custom or embedded browsers that do not support normal cookie sharing for authentication flows.
    3. If an app uses MSAL on iOS with a custom browser configuration (for example, SFSafariViewController, SFAuthenticationSession, ASWebAuthenticationSession, or WKWebView), configure it so that cookies can be shared and preserved across the entire sign-in flow, or revert to the default Safari system browser behavior, which supports SSO state sharing and proper token/cookie handling.

    These steps ensure that the required user context values (cookies and related state) are maintained across the complete sign-in flow, preventing repeated failures with missing session context.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    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.