mguessan / davmail

DavMail POP/IMAP/SMTP/Caldav/Carddav/LDAP Exchange and Office 365 Gateway - Synced with main subversion repository at
http://davmail.sourceforge.net
GNU General Public License v2.0
573 stars 84 forks source link

Exchange cannot access this right now error (AADSTS900561) #232

Open fast-90 opened 2 years ago

fast-90 commented 2 years ago

Hi,

For one of my corporate Exchange accounts, I get the following message:

image

Clicking on next gives me a "AADSTS900561: This endpoint only accepts POST requests. Received a GET request."

Does this mean that the administrators have disabled the option to use Davmail?

For reference, I have the following in my davmail.properties file:

davmail.oauth.clientId=d3590ed6-52b3-4102-aeff-aad2292ab01c
davmail.oauth.redirectUri=urn:ietf:wg:oauth:2.0:oob
davmail.mode=O365Interactive

which does work for a different Exchange account I have, but not this one.

mguessan commented 1 year ago

This looks like a conditional access issue, you have to find which conditions were added by your admins.

As an example it may be a user-agent control => try to switch to O365Manual and open the authentication link in edge.