you are trying to authorize api access with an admin user who is not registered the email setup. I got the same error at least when hitting the authorize api access button. solved by using an account connected to the setup to authorize, not admin user.
+20 1111817748
contact me on whatsapp i have the solution
Hey everyone, been having these problems as well. Managed to get a âno-replyâ email working with M365, however my problem is that after a while (between 2h and 24h) it seems that the email account âlosesâ access to the API authorization, and I need to do the âAuthorize API Accessâ loop again, otherwise it does not send out emails from Frappe. Any one has an idea about this?
Hi @PedroJACorreia:
Seems refresh token is not being generated âŚ
Check your connected app doctype.
See this docs too:
https://frappeframework.com/docs/user/en/microsoft-email-oauth#service-principal-authentication
Hope this helps.
Hi avc, thanks for the quick reply.
Is there a way to force the token generation? Mine is being generated, but the problem persists; once I âAuthorize API Accessâ in the email account menu for my no-reply account, it works just fine. But after a certain amount of time (1-2 hours) it seems to lose connection to M365 and asks for the âAuthorize API Accessâ again. Doing it again makes it work again for a short time, then rinse and repeat.
I donât have the âAuthenticate as Service Princpalâ checkbox as the documentation suggests. Is there something Iâm missing?
Check your Token Cache. It needs to have refresh_token field populated. To obtain refresh token offline_access scope is required.
Not related to Microsoft, some providers may make it mandatory to âverify appâ or set it up âproduction modeâ to start obtaining refresh tokens.
We had App created from both the OAuth settings and Connected Apps. We deleted one from the OAuth page and kept the one from Connected Apps. Also make sure that, you are logged in with the same user and not as Admin. This shall work. Excellent work by Frappe with this connector.
Hello @avc,
do you know why i get the error âDNS_PROBE_FINISHED_NXDOMAINâ if i would like to api authorisation a new e-mail account?
Regards
Kevin