Skip to content
Back

Facing this Exception User (role: guests) missing scopes (["account"])

  • 0
  • Auth
  • Web
  • Cloud
Sriram
19 Nov, 2025, 09:54

After creating an OAuth2 session using createOAuth2Session in Appwrite, the session is created successfully in the cloud console, but when I try to fetch user details on the frontend, account.get() returns null. My web platform is properly connected. What could be causing this and how can I fix it?

code: export async function loader(){ try { return await account.get(); } catch(e) { console.log(e); } }

Exception: User (role: guests) missing scopes (["account"])

TL;DR
Issue: After creating an OAuth2 session in Appwrite, the user role 'guests' is missing the necessary scopes (["account"]), causing account.get() to return null when fetching user details on the frontend. Solution: Update the user's role to include the required scopes for account access in Appwrite to resolve this issue.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more