Skip to content

Successfully configured both Microsoft and Google OAuth providers simultaneously #798

@keskinonur

Description

@keskinonur

Hello,

I wanted to share that I've successfully configured Open WebUI to work with both Microsoft and Google OAuth providers simultaneously, despite the documentation suggesting this isn't directly supported.

Solution

The key is to configure only one provider as the OpenID Connect provider while configuring the other as a standard OAuth provider. Here's my working configuration:

environment:
  - ENABLE_OAUTH_SIGNUP=true
  - OAUTH_MERGE_ACCOUNTS_BY_EMAIL=true
  
  # Microsoft as OpenID Connect provider
  - MICROSOFT_CLIENT_ID=${MICROSOFT_CLIENTID}
  - MICROSOFT_CLIENT_SECRET=${MICROSOFT_CLIENTSECRET}
  - MICROSOFT_CLIENT_TENANT_ID=${MICROSOFT_CLIENTTENANTID}
  - MICROSOFT_REDIRECT_URI=${MICROSOFT_REDIRECTURI}
  - OPENID_PROVIDER_URL=${MICROSOFT_PROVIDERURL}
  
  # Google as OAuth provider (without OpenID URL)
  - GOOGLE_CLIENT_ID=${GOOGLE_CLIENTID}
  - GOOGLE_CLIENT_SECRET=${GOOGLE_CLIENTSECRET}
  # Note: No OPENID_PROVIDER_URL for Google

Why this works

  • Microsoft is configured as the primary OpenID Connect provider
  • Google is configured as a secondary OAuth provider
  • The OAUTH_MERGE_ACCOUNTS_BY_EMAIL=true setting allows users with the same email address to be merged into a single account
  • Both login and logout flows work correctly

This might be helpful for organizations that need to support multiple identity providers.

Hope this helps others facing the same requirement!

Reference: https://github.com/open-webui/docs/blob/main/docs/features/auth/sso/index.mdx

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