How to Authenticate an IMAP, POP, or SMTP connection using 2.0 Auth for ERP, SMTP application server
https://microsoftandbeyond.blogspot.com/2023/05/office-365-and-imap-or-pop3-with-oauth.html
https://learn.microsoft.com/en-us/exchange/client-developer/legacy-protocols/how-to-authenticate-an-imap-pop-smtp-application-by-using-oauth
Application (client) ID
:
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Object ID
:
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Directory (tenant) ID
:
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
secret value:
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Install-Module -Name AzureAD
Install-Module -Name ExchangeOnlineManagement
$AppId = “XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX”
$TenantId = “XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX”
Import-module AzureAD
Connect-AzureAd -Tenant $TenantId
($Principal = Get-AzureADServicePrincipal -filter “AppId eq ‘$AppId'”)
$PrincipalId = $Principal.ObjectId
$DisplayName = “principal for IMAP/POP3”
Import-module ExchangeOnlineManagement
Connect-ExchangeOnline -Organization $TenantId
New-ServicePrincipal -AppId $AppId -ServiceId $PrincipalId -DisplayName $DisplayName
Add-MailboxPermission -User $PrincipalId -AccessRights FullAccess -Identity “Your email ID”
by Microsoft & beyond
linux smtp client
Thank you so much for this video! The detailed explanation of how to authenticate IMAP, POP, and SMTP connections using OAuth 2.0 was incredibly helpful. Your step-by-step guide made it easy to follow along. Looking forward to more great content!
I want to register azure ad enterprise app through .net code.. suggest any video demo for this..
do you know how to avoid error Authentication unsuccessful, user is locked by your organization's security defaults policy , i don't want turn off security default's , i need use send thru SMTP with office365 mailbox from one app and multi printer..
Hi
can you check why this is coming, I follow your process only . but it still getting error
PS /home/d> Connect-ExchangeOnline -Organization $TenantId
Connect-ExchangeOnline: A parameter cannot be found that matches parameter name 'Organization'.
PS /home/d>
PS /home/d> New-ServicePrincipal -AppId $AppId -ServiceId $PrincipalId -DisplayName $DisplayName
New-ServicePrincipal: The term 'New-ServicePrincipal' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
Will this work to add smtp.access as well if I choose SMTP under the permissions?
Hello Man, thank you for your videos , they are very helpfull , Could this be valid for setting up an Office 365 account in Outlook with pop3?
❤❤
Very good 👍
Thanx for amazing video.
I have SAP application in-premises and wants to relay email using SMTP OAuth by the smtp client submission.
I have done the enterprise registration and added API send permission as a application administrator but still unable to send email from SAP application and giving error.
Sir, would you be available for some consulting work on this to get it working for us? We have IMAP Working but cannot get SMTP on the same. I think we need your expertise!
very useful!
Hi, is it possible to send emails using SMTP and oAuth authentication?
Thank you for the tutorial but i have a small question: i followed all your steps and they worked fine but which login details should i use now for the application to send mails?
thanks for the demonstration.
Super!
Good!
Hello, I completed the setup using above video but still getting popups when trying to sign in with IMAP.
Regarding Client secrect portion – when we'll need to apply that in the setup process?
Great job.
Superb!
Very nice video!
Fantastic!
great
Very good.
Nice. Thank you.
Nice one! Keep it up.
Awesome, keep it up.
Very good.
Much needed tutorial. appriciate for the demonstration.