SMTP Modern oauth Authentication with POSTMAN

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
SMTP authentication using Postman so we're gonna follow the new protocol which is or 2.0 as Microsoft has deprecated the older version of authentication uh that is the basic authentication so what I'm going to do is I'll start from the app registration so here I am on portal.azure.com and um I'm inside the Azure director directory I'll be going ahead and creating a new app registration here I'll be naming my application SMTP sample so you can give any user friendly name uh once I have my name over here I'll be clicking on register all right so our application has now has been registered on Azure ID uh what I have to do is I'll have to go to the API permission section I click on ADD select Microsoft graph delegated permission and here you need to type in s MTP yeah so here you go I've added the permission okay so SMTP dot send all right so let's move back to postman so here I have a fresh new uh request Okay so just click on new get request okay so I'll be getting an SMTP token using Postman so you might be wondering why I am using Postman uh to authenticate SMTP and to get the access token using over so using Powershell is usually tiring to get those commands sorted in the first step itself uh this is just to you can use Postman you know just to test whether the uh whether the token you are issuing is correct or your setup is correct or not so you can quickly test that using Postman and then you can have the token handy on your site so uh all you need to do is create a new request and Postman uh go to the authorization tab uh from the drop down here select oo 2.0 okay once you have that selected um you have the access token a select authorization code because a client credential flow doesn't work for SMTP remember um remember that okay so here you need a postman callback URL so I'll have to Google it let me Postman call back URL let me Google that real quick again um so the postman callback URL is what I need to find okay I have it written handwritten so I'll I'll replace it here http s uh forward slash www dot Postman dot com slash to slash callback so it is Postman so yeah so it is https www.postman.com or2 and slash callback so I need to copy this uh URL here and the Azure as well you need to go to the authentication section and add the platform need to select web and paste in the redirect URL over here and just check these two items here click on configure once you have that you need to click on Save uh okay so I guess uh this is enabled now we need few other details uh this is over 2.0 uh I need the tenant ID authorization endpoint uh so I'll click on copy to the clipboard uh then I'll need the access token endpoint paste it over here uh then I need a client ID you can get the client ID over here client ID and then I'll need a client secret so for secrets I'll have to create a new certificate client secret over here so I'll click this sample click on ADD uh you need to copy the value part and not the ID part okay you need to copy the value part I'll be replacing the value part over here and now we are getting ready to uh go before that I need to change the scope okay since we are accessing SMTP we will need Outlook Dot um we need Outlook DOT office dot com slash smtp.sen SMTP dot send okay uh so the dot part okay smtp.sen and now we are ready to you know call the or 2.0 endpoint to get the access token for SMTP uh click on get access token I'll need to sign in so I'll put in my sandbox account I'll put in my password and yeah so permission requested as from the SMTP sample app which we just created this app would like to access sending email from our mailbox using that particular permission that we just granted uh I'll click on accept and here we go we got the access token I can click on user token okay I'll copy this and now you can use this token to you know um do the SMTP functions that you intended to do so I'll just decode the token and show you the claims so is the name of the app that has been displayed and apart from that uh here the scope SMTP dot send which we just granted in our app um so if I go to the API section you can find that all right so this was the tutorial on how to authenticate SMTP using Postman and using the credential from Azure ID so if you have any other questions or you need help uh with regards to this uh please feel free to drop the comments in the chat and I'll be happy to help thank you guys
Info
Channel: Graph Explorer
Views: 8,104
Rating: undefined out of 5
Keywords:
Id: FwH9EilEaBc
Channel Id: undefined
Length: 7min 53sec (473 seconds)
Published: Sun Oct 16 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.