Configuring an Office 365 account with OAuth

I am new to Linux and ERPNext. I am using the Bitnami version of ERPNext hosted in an Azure VM. When I try to setup an Email account with OAuth with office 365, the redirect URL is incorrect. Also I create a OAuth client but when I try to use it while configuring the email account it does not show up. I am forced to create a connected App which shows the Redirect URI incorrect once created. This is what comes up.
“http://'http:/api/method/frappe.integrations.doctype.connected_app.connected_app.callback/9f23c19b42”

All I am trying to do is setup an Email account so I can start using the system. I tried with Sendgrid as well but as Sendgrid does not have a IMAP/POP capability, it doesn’t even save the settings.

Please help

Hi @Imran_Khan,

Please check the Tutorial or the whole post.

I hope this helps.

Thank You!

Thank You for the article, I followed a couple of other articles similar to this but this one does have a few different steps. Will try it and provide feedback. I have been working on this for more than a week now, so I believe I am running out of patience. :sweat_smile:

I am running the below version.

ERPNext: v14.30.3
Frappe Framework: v14.40.3

I still facing the same issue and seems like my redirect URL is being generated incorrectly. I am stuck at step 2.b.2 of the shared article.
In my case, the redirect URL that gets generated looks like this, “http://'http:/api/method/frappe.integrations.doctype.connected_app.connected_app.callback/47d9c07d7e”. I am missing my site URL. How can I change “http://'http:” in the above URL to “https://erp.domainname.com” so that my redirect URL is populated correctly.