Hello Bishal Das,
Thank you for reaching out to Microsoft Support!
Depending on your needs, it is recommended that you use the Graph API to send email.
When using the Graph API, you first need to grant the application permission. You can grant the application permission Mail.Send, and then get the token. See the documentation for details:
The obtained token can then be used to request the sendMail endpoint to send mail.
If you need to send emails programmatically, Graph SDKs is recommended.
Hope this helps.
If the answer is helpful, please click Accept Answer and kindly upvote it. If you have any further questions about this answer, please click Comment.