@KevinTheJedi After successfully authenticating my Microsoft email (Office 365/Outlook) with osTicket, I noticed that incoming emails are not being converted into support tickets. Fetching is enabled, and the IMAP connection appears to be working correctly.
What I’ve Already Checked:
System Info:
nadeem9810
Cheers.
Hi KevinTheJedi As you suggested, I have updated osTicket and the PHP version. However, it is still not fetching tickets from the Microsoft email account, even though I can successfully fetch tickets from other email servers using the same settings.
After receiving the success message for Microsoft authentication, I noticed the following issue: on the email settings page, once I refreshed the page, the settings for that email account were changed — "Enable" was disabled, and other fields were blank, although I could see the token details.
Please review the attached screenshots.
After refresh
KevinTheJedi Below are the permissions and scopes, and I have successfully authenticated with both.
offline_access https://outlook.office.com/IMAP.AccessAsUser.All https://outlook.office.com/POP.AccessAsUser.All https://outlook.office.com/SMTP.Send
offline_access https://graph.microsoft.com/IMAP.AccessAsUser.All https://graph.microsoft.com/POP.AccessAsUser.All https://graph.microsoft.com/SMTP.Send
Look at the resource owner. It does not match the email in question. You need to use the email itself to authenticate.
KevinTheJedi
Could you please clarify what you mean? I'm having trouble understanding and would appreciate your guidance on what exactly needs to be changed.
KevinTheJedi Please reply I have receive below token details after successfully authentication:
In your above screenshot of the token the Resource Owner is “live.comp…@outlook.com” (can’t see the full thing as it’s censored). The Resource Owner needs to be the email you are configuring in osTicket - in this case “parahittech@outlook.com”. Delete the current token via the button in the Authentication popup, resubmit the popup, and when you are brought to Microsoft you login as “parahittech@outlook.com”. Once you get a token for the correct user you can retest.
Also, your Scopes are incorrect. You must use these:
Okay, I have shared another email account, and after Microsoft authentication, I received the token. However, I’m still unable to fetch emails or create related tickets.
You can see the token is clearly expired; you need to retrieve a new one.
Also, that is one is missing offline_access scope…you really need to start double checking all your setting as per the documentation.
Ok its not auto reset, now I have re-submit but still not fetch emails.
Read my comment above.
I have send Outlook Scopes as below: offline_access https://outlook.office.com/IMAP.AccessAsUser.All https://outlook.office.com/POP.AccessAsUser.All https://outlook.office.com/SMTP.Send
API permission on Microsoft as below:
and get token details as above mention
If that's for both the email in osTicket and the App Registration in Entra then that's good. Once you get the Token with the valid scopes and right user you make sure the Remote Mailbox tab has hostname, port, etc. configured and that the Status is set to Enabled. Then you Save Changes and ensure it save successfully. Then you make sure global fetching is enabled (Admin Panel > Emails > Settings > Email Fetching > Enable). Lastly, you make sure a valid cron job/scheduled task is running and you should be good to go.
Thanks, KevinTheJedi for your support. My issue was resolved after granting the same API permissions from the Microsoft admin panel.