docs icon indicating copy to clipboard operation
docs copied to clipboard

Successfully configured both Microsoft and Google OAuth providers simultaneously

Open keskinonur opened this issue 1 month ago • 1 comments

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

keskinonur avatar Nov 08 '25 14:11 keskinonur

@keskinonur wanna add this as a community tutorial to the docs?

Classic298 avatar Nov 08 '25 15:11 Classic298