Skip to content

OAuth Troubleshooting

Common OAuth connection issues

Verify the OAuth connection exists:

  • Go to SettingsOAuth Connections
  • Check that the connection shows as “Connected”

Bifrost automatically refreshes tokens, but if the refresh token has expired:

  1. Delete the existing OAuth connection
  2. Re-authorize to get a fresh token

Ensure the OAuth app has the required scopes/permissions for your API calls.

from bifrost import workflow, oauth
import aiohttp
@workflow
async def call_graph_api():
"""Example Microsoft Graph API call."""
conn = await oauth.get("microsoft")
if not conn:
return {"error": "Microsoft OAuth not configured"}
headers = {"Authorization": f"Bearer {conn['access_token']}"}
async with aiohttp.ClientSession() as session:
async with session.get(
"https://graph.microsoft.com/v1.0/me",
headers=headers
) as resp:
return await resp.json()
ErrorCauseFix
”OAuth not configured”Connection doesn’t existAdd OAuth connection in Settings
401 UnauthorizedToken expired or wrong scopesRe-authorize or check scopes
”refresh_token invalid”Refresh token revokedDelete and re-authorize