OAuth not working
Moderator: mkoch227
OAuth not working
Script URL:
Version of script: 3.4.0
Hosting company: Hosted on site
What terms did you try when SEARCHING for a solution: OAuth
Write your message below:
While setting up OAuth everything went fine however when I save my Oauth provider I was not sent to Microsoft sign in only got Success: OAuth provider has been saved
When I went into IMAP Fetching and set everything up it tests successfully however emails are not being pulled in.
I set up cronjob to run hesk_imap.php but nothing.
Version of script: 3.4.0
Hosting company: Hosted on site
What terms did you try when SEARCHING for a solution: OAuth
Write your message below:
While setting up OAuth everything went fine however when I save my Oauth provider I was not sent to Microsoft sign in only got Success: OAuth provider has been saved
When I went into IMAP Fetching and set everything up it tests successfully however emails are not being pulled in.
I set up cronjob to run hesk_imap.php but nothing.
Re: OAuth not working
What happens if you manually run hesk_imap.php in browser (step 5 in the article)?
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Re: OAuth not working
If I do that I receive the following
#!/usr/bin/php -q
#!/usr/bin/php -q
Re: OAuth not working
Go to Admin > Settings > Help desk > under "Features" find "Debug mode", turn it off and save changes.
Then open the hesk_imap.php file again. What does it say now?
Then open the hesk_imap.php file again. What does it say now?
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Re: OAuth not working
I now get this however I have 3 unread messages in that inbox.
#!/usr/bin/php -q
Connected to the IMAP server "outlook.office365.com:993".
No unread messages found.
Disconnected from the IMAP server.
#!/usr/bin/php -q
Connected to the IMAP server "outlook.office365.com:993".
No unread messages found.
Disconnected from the IMAP server.
Re: OAuth not working
Are the unread messages maybe in a shared mailbox or somewhere? Office will only send emails from the actual inbox to Hesk.
How about if you mark them read, then unread again?
How about if you mark them read, then unread again?
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Re: OAuth not working
messages are in a standard office 365 mailbox located in the inbox. I marked as read then back to unread and receive the same message.
Like I mentioned when I setup the OAuth provider I was not directed to sign into microsoft with my account.
Like I mentioned when I setup the OAuth provider I was not directed to sign into microsoft with my account.
Re: OAuth not working
What exact success message do you get if you go to Admin > Settings > Email and under IMAP Fetching click "Test connection"? How many messages are mentioned?
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Re: OAuth not working
Below is what I get
Success: Connection successful!
Number of emails your mail server will send to Hesk: 0
Success: Connection successful!
Number of emails your mail server will send to Hesk: 0
Re: OAuth not working
That means the connection works (you were probably logged in already when adding an OAuth provider), but nothing is sent over IMAP.
Not sure what to look for here. It wouldn't make sense that Office 365 would send a wrong status message over IMAP.
Are you sure the unread messages are in the INBOX, and not some other folder?
Can you send a screenshot of your Inbox folder (login at outlook.office365.com) to me in a private message?
Are you able to create a test email address in your O365 account and try connecting to that mailbox, to see if that makes any difference?
Not sure what to look for here. It wouldn't make sense that Office 365 would send a wrong status message over IMAP.
Are you sure the unread messages are in the INBOX, and not some other folder?
Can you send a screenshot of your Inbox folder (login at outlook.office365.com) to me in a private message?
Are you able to create a test email address in your O365 account and try connecting to that mailbox, to see if that makes any difference?
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Re: OAuth not working
PM Sent, also tested a different email in IMAP settings. Still was not prompted to login on OAuth providers and gave same messages.
Re: OAuth not working
For anyone else experiencing problems, try this:
1. delete the OAuth provider
2. open Hesk in a PRIVATE BROWSING window to make sure you are not logged in anywhere
3. add OAuth provider
4. when adding it and asked to login, make 100% sure you login with the email account you will use for Hesk
1. delete the OAuth provider
2. open Hesk in a PRIVATE BROWSING window to make sure you are not logged in anywhere
3. add OAuth provider
4. when adding it and asked to login, make 100% sure you login with the email account you will use for Hesk
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Re: OAuth not working
I had the same issue, but this solved the problem. Thanks.Klemen wrote: Fri Sep 23, 2022 8:00 pm For anyone else experiencing problems, try this:
1. delete the OAuth provider
2. open Hesk in a PRIVATE BROWSING window to make sure you are not logged in anywhere
3. add OAuth provider
4. when adding it and asked to login, make 100% sure you login with the email account you will use for Hesk
Re: OAuth not working
Great, I've added a notice about this to the Knowledgebase article.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools