Roundcube Community Forum

Release Support => Pending Issues => Topic started by: TiffanyLynch on March 15, 2026, 03:24:36 AM

Title: Invalid scope while authenticating to Outlook with oauth
Post by: TiffanyLynch on March 15, 2026, 03:24:36 AM
Hello. I want to use roundcube to access outlook. I created an oauth application in entra ID, assigned necessary permissions, copy-paste the example from defaults.inc.php file, and replaced the client ID and secret placeholders with my own. I was bounced back to login page, with an error (only shown in the URL,) `invalid_scope`. I checked the permission details for IMAP.AccessAsUser.All and SMTP.Send, turns out it's also within `graph.microsoft.com`. So i think the `https://outlook.office365.com/` part in oauth scope is not needed at all. I tried stripping that part, and finally got an oauth token, but i was bounced back to login page with no error reported even with debug_level set to 1. And i'm using roundcubemail-1.6.13-complete.tar.gz archive to deploy roundcube.
Title: Re: Invalid scope while authenticating to Outlook with oauth
Post by: JohnDoh on March 15, 2026, 05:08:23 AM
does this help? https://github.com/roundcube/roundcubemail/pull/9939
Title: Re: Invalid scope while authenticating to Outlook with oauth
Post by: TiffanyLynch on March 18, 2026, 12:05:18 AM
So i asked on microsoft learn forum¹ about the issue, and from my understanding, the outlook.office.com scope is only for Exchange Online, which is paid and common in organizations. But he also mentioned that Exchange Web (API providing the outlook.office.com scope) is also in the process of being deprecated and moved to Graph API. So is the pull request you mentioned makes Outlook OAuth work with Microsoft Graph?
¹ https://learn.microsoft.com/en-us/answers/questions/5825132/how-to-add-permission-from-office-api-scopes