BENELUX Posted November 18 Share Posted November 18 Hey WHMCS Community So here’s the thing… I love WHMCS. It’s great. But right now, it has a little “quirk” when it comes to shared mailboxes. Imagine this: I’ve got my main mailbox doing its thing, happily bringing in emails. But then there’s the shared mailbox, the one that all the support team emails go to. WHMCS? It sees it… but then pretends it doesn’t exist. 😅 Here’s the geeky version: WHMCS currently uses /me/messages from Microsoft Graph API. This only fetches emails from the authenticated user’s mailbox. Shared mailbox? Nope, invisible. Even if Full Access is granted in Exchange and you’ve got all the delegated permissions like Mail.Read.Shared, WHMCS is like, “I don’t see anything here. Must be Monday.” The right way (according to Microsoft Graph) is: GET https://graph.microsoft.com/v1.0/users/{shared-mailbox}/mailFolders/inbox/messages Yes, WHMCS, that mailbox does exist, and yes, I do have permission to read it. What I’m asking: Can WHMCS please natively support shared mailbox imports? Guidance on exactly which delegated permissions are needed (so I don’t go on a wild goose chase for nothing). Support for the correct Graph API endpoint. Bonus points: documentation for optional PHP session settings for cross-site OAuth flows (because apparently, cookies are shy and need proper settings to stick around). Expected outcome: Fetch emails from shared mailboxes without needing a license for it. Less headache, more sanity. WHMCS behaving like the email superhero it’s meant to be. Anyone else banging their head on the “shared mailbox wall”? Let’s commiserate, share workarounds, and maybe get WHMCS to notice that shared mailboxes exist in the universe. Thanks! 0 Quote Link to comment Share on other sites More sharing options...
slim Posted November 19 Share Posted November 19 Yeah, Ive hit this - had to license the mailbox - so it has a direct login. 😞 0 Quote Link to comment Share on other sites More sharing options...
BENELUX Posted November 20 Author Share Posted November 20 We’re going to go ahead and grab an Exchange Online license ourselves to get it working for now. Hopefully, WHMCS will notice shared mailboxes exist in the universe and improve native support ASAP. 0 Quote Link to comment Share on other sites More sharing options...
Solution BENELUX Posted 8 hours ago Author Solution Share Posted 8 hours ago UPDATE: We got it working! For anyone else hitting the “Approval Required” wall when trying to connect a standard (licensed) Exchange user, we found the culprit. We managed to solve this, but it required two specific changes due to how WHMCS is hardcoded. 1. The "Shared Mailbox" had to become a "Licensed User" Because WHMCS hardcodes the Graph API call, it is technically impossible to access a Shared Mailbox via a delegate admin account. * The Fix: We converted the Shared Mailbox to a regular User Mailbox and added an Exchange Online license. This ensures that when we authenticate as that user, correctly refers to the support mailbox. 2. We had to strip `prompt=consent` manually Once we switched to a standard licensed user (non-admin), we hit the "Approval Required" wall during OAuth. * The Cause: WHMCS appends `&prompt=consent` to the auth URL, which forces a new consent prompt that standard users cannot accept (due to our Azure security policies). * The Workaround: By manually removing this parameter from the URL in the browser, Microsoft respected the Tenant-Wide Admin Consent we had already granted, and the connection went through immediately. Summary: If you are struggling with this, you cannot use a true Shared Mailbox with WHMCS right now. You must license it as a user and clean up the Auth URL to get it connected. Hope this saves someone else the debug time! ☕️ 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.