mirror of
https://github.com/open-webui/docs.git
synced 2026-07-20 15:38:19 -04:00
Issue: Document offline_access Scope for Microsoft OAuth Summary #148
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Classic298 on GitHub (Feb 12, 2026).
Issue: Document
offline_accessScope for Microsoft OAuthSummary
The Microsoft OAuth documentation should recommend adding
offline_accessto the OAuth scopes to enable token refresh and prevent session expiration issues.What is
offline_access?The
offline_accessscope is a standard OAuth 2.0 scope that instructs Microsoft's identity platform to return a refresh token alongside the access token during authentication.openid email profile(current default)access_tokenonlyopenid email profile offline_accessaccess_token+refresh_tokenMicrosoft's access tokens expire after approximately 1 hour. Without a refresh token, there is no way to obtain a new access token without requiring the user to re-authenticate.
Why It Matters
Open WebUI stores the OAuth session server-side and includes middleware that automatically refreshes tokens before they expire. However, this refresh mechanism only works if a refresh token was provided during initial authentication.
Without
offline_access:No OAuth session found for user X, session Ysystem_oauth, OneDrive integration, profile picture updates)With
offline_access:Symptoms of Missing
offline_accessLog warnings that appear repeatedly after users have been logged in for more than 1 hour:
These warnings are harmless for basic chat functionality (which uses Open WebUI's JWT, not the OAuth token), but indicate that:
auth_type: "system_oauth"will not workRecommended Documentation Update
File:
docs/features/sso.md(Microsoft section)Current documentation shows:
Suggested addition:
References
Microsoft Identity Platform Scopes Documentation
Open WebUI OAuth middleware:
backend/open_webui/utils/oauth.py-_perform_token_refresh()method requires refresh token to functionImpact