Skip to content

OIDC prompt: Fix sending wrong prompts (was: Microsoft Entra ID authentication fails with AADSTS90023 due to hardcoded OIDC prompt) #65

Closed

Description

@laitco

Steps to reproduce

  1. Configure OpenCloud 7.2.0 with Microsoft Entra ID (OIDC).
  2. Install the latest OpenCloud iOS app from the App Store.
  3. Add the OpenCloud server URL.
  4. Start the OpenID Connect login.
  5. Authenticate with Microsoft Entra ID.

Expected behavior

The authentication should complete successfully and the user should be redirected back to the OpenCloud iOS app.

Actual behavior

Authentication fails with Microsoft Entra ID returning:

AADSTS90023: Unsupported 'prompt' value.

The login never completes and no session is established.

Investigation

After debugging the iOS SDK, the issue appears to be caused by a hardcoded OpenID Connect prompt.

OpenCloudSDK/Authentication/OCAuthenticationMethodOpenIDConnect.m

OCAuthenticationMethodOpenIDConnectPrompt : @"select_account consent"

This value is later added unchanged to the authorization request:

@"prompt" : (self.prompt != nil) ? self.prompt : ((NSString *)NSNull.null)

Microsoft Entra ID rejects this prompt with:

AADSTS90023: Unsupported 'prompt' value.

The OpenCloud server is correctly configured:

  • /.well-known/openid-configuration returns HTTP 200
  • /.well-known/webfinger returns HTTP 200
  • Web login using the same Entra ID configuration works successfully

This indicates the problem is specific to the Apple client (iOS/macOS SDK) and not the OpenCloud server.

Suggested fix

The client should not send a hardcoded prompt value.

Possible solutions:

  • Do not send the prompt parameter by default.
  • Send only select_account.
  • Make the prompt configurable depending on the Identity Provider.

Microsoft Entra ID rejects the current default value select_account consent.

Client

iOS version:
Please fill in.

OpenCloud app version:
Latest App Store version.

Device model:
Please fill in.

Server configuration

OpenCloud version:
7.2.0

Identity Provider:
Microsoft Entra ID (OIDC)

Logs

OpenCloud server error log

No relevant server-side errors.

The following endpoints work correctly:

  • /.well-known/openid-configuration
  • /.well-known/webfinger

Both return HTTP 200.

The authorization flow fails before authentication because Microsoft Entra ID rejects the authorization request with AADSTS90023.

Activity

  1. changed the title [-][BUG][/-] [+][BUG] Microsoft Entra ID authentication fails with AADSTS90023 due to hardcoded OIDC prompt[/+] on Jun 29, 2026
  2. guruz commented on Jun 30, 2026

    @guruz
    Collaborator

    See also the discussion in opencloud-eu/desktop#918
    I think it's best to also open something in https://github.com/opencloud-eu/opencloud/issues/ so it gets more visbility.

    Maybe the IDP supported prompt could also come via server side webfinger configuration reply?

  3. laitco commented on Jun 30, 2026

    @laitco
    Author

    See also the discussion in opencloud-eu/desktop#918 I think it's best to also open something in https://github.com/opencloud-eu/opencloud/issues/ so it gets more visbility.

    Maybe the IDP supported prompt could also come via server side webfinger configuration reply?

    In DesktopApp the Issue and PR is closed. What did you recommend to open in Server Repo as general support EntraID? Generally i got EntraID working without roles/groups mapping because these were not being claimed but i am doing a general FR and maybe you can add something to it.

  4. guruz commented on Aug 19, 2026

    @guruz
    Collaborator

    @rhafer @micbar Does it make sense to return this "prompt" value to be used from webfinger too?
    I have too little experience with this topic to make a decision if any of @laitco or my proposals are good here..

  5. guruz commented on Sep 2, 2026

    @guruz
    Collaborator

    @rhafer @micbar Does it make sense to return this "prompt" value to be used from webfinger too?

    There is actually prompt_values_supported in https://demo.opencloud.eu/.well-known/openid-configuration but that's not used by the app.

  6. changed the title [-][BUG] Microsoft Entra ID authentication fails with AADSTS90023 due to hardcoded OIDC prompt[/-] [+]OIDC prompt: Fix sending wrong prompts (was: Microsoft Entra ID authentication fails with AADSTS90023 due to hardcoded OIDC prompt)[/+] on Sep 2, 2026
  7. guruz commented on Sep 2, 2026

    @guruz
    Collaborator

    Could you please give us the prompt_values_supported from the .well-known/openid-configuration ?

  8. guruz commented on Sep 5, 2026

    @guruz
    Collaborator

    @laitco Could you please try this with the 1.2.4, Build (5) (not 4!) testing build from Testflight? Please report back.
    https://testflight.apple.com/join/2F5wWTGV

    It sets the prompt=login. (cc @TheOneRing )

  9. ddse commented on Sep 14, 2026

    @ddse
  10. guruz commented on Sep 14, 2026

    @guruz
  11. ddse commented on Sep 15, 2026

    @ddse

    @guruz
    Thank you. I agree that this appears to be unrelated to the prompt= value, so I will open a new issue for the OAuth callback problem.

    I’ll retest using OpenCloud iOS 1.2.4, Build (5) from TestFlight with logging enabled, and provide the complete client logs from the authentication flow so we can investigate where the callback is being lost.

    I’ll also include the corresponding Autentico server-side logs for comparison.

  12. guruz commented on Sep 21, 2026

    @guruz
    Collaborator

    @ddse OK great :)

    @laitco 1.2.4 is now released in app store. Could you re-test?

  13. added a commit that references this issue on Sep 24, 2026
  14. guruz commented on Oct 6, 2026

    @guruz
    Collaborator

    Closing for now, let's wait for more feedback or new issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions