Is Microsoft Graph API using SMTP at the back? - microsoft-graph-api

I am trying to use Graph API to send 20 messages within 1 minute to certain teams channel. Does Graph API use SMTP protocol to send email?
POST /me/messages/{id}/forward
POST /users/{id | userPrincipalName}/messages/{id}/forward
POST /me/mailFolders/{id}/messages/{id}/forward
POST /users/{id | userPrincipalName}/mailFolders/{id}/messages/{id}/forward

Microsoft Graph uses the user's Exchange Online or Outlook.com mailbox to send the mail. Those services do use SMTP.

Related

How to send encrypted mail with microsoft graph api

I want to send an encrypted mail with microsoft graph api. Sending normal mails works as outlined in https://learn.microsoft.com/en-us/graph/api/user-sendmail?view=graph-rest-1.0&tabs=http
however this option of outlook web does not seem to be available:

How to differentiate between user mailboxes and shared mailboxes using Microsoft API

Is there a way we can differentiate between a user mailbox and a shared mailbox using Microsoft graph API or EWS API?

Is there any to get user unique identity after authentication process of MS Graph API?

Currently, I am using the Microsoft OneNote API (REST) to read the content of OneNote Pages. I have already subscribed for the notifications on the event of any changes happens in any page's content. Microsoft so sends me a notification for every change in the content of any page. They send a combination ofX-Authenticated user_id and subscription ID in the webhook. Like this:
{
"value": [
{
"subscriptionId": "WLID-00000000441A2E0C",
"userId": "WLID-1F50AB22CBE04E58"
}
]
}
Recently, MS released the Graph API and recommended to use this one instead of the OneNote API. SO, I am migrating my implementation from OneNote API to Graph API.
I was getting userId (WLID-1F50AB22CBE04E58) with X-Authenticated-userId in the headers of the response of one of this API in OneNote API
https://www.onenote.com/api/v1.0/me/notes/notebooks
But, I am not getting this with Microsoft Graph. There should be a unique identity for each user who is completing the Authentication process.
Where will I get userId from Microsoft Graph?
Authentication isn't handled by Microsoft Graph, it's handled by Azure Active Directory. You can get additional user information using OpenID Connect by requesting the scopes openid, email, and profile.
You can also get the current user's profile by calling the /me endpoint (https://graph.microsoft.com/v1.0/me).
Webhook Subscriptions also return a creatorId which will be the id for the authenticated user that created the subscription.

Azure AD App-only token to consume outlook REST API

I am developing a console app in .net which will send mail using the Azure AD application. I followed all the step from generating the certificates to registered an application in Azure AD. Then provided the application permission (Send mail as any user) using Microsoft graph API and provided it “grant permission” as an admin consent.
In my console app code I uses the below outlook api to send mail as
resourseurl — https://outlook.office.com/api/v1.0/users/{my email account}/sendmail. After providing grant permission to my app I am still facing the 401:unauthorized error.
You gave permissions to Microsoft Graph API, so you need to use it.
https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/user_sendmail
The URL that you need to use is thus:
POST https://graph.microsoft.com/v1.0/users/{id | userPrincipalName}/sendMail
Internally the graph API does call the API you mentioned. But your token is for the graph. Not the outlook API.
You also mentioned the resource URL. The graph API resource URL is https://graph.microsoft.com.

Can the Microsoft bot framework access the Slack web API methods?

Is there a way for the Microsoft bot framework to get access to the web API methods in the Slack API (channel read for example)?
If your bot needs access to Slack specific APIs, it should call the Slack API directly using the bot credentials (Client ID and Client Secret) that Slack provided when you created the app. Going through BotFramework would add additional hops making your bot less performant.

Resources