I'm trying to code something where users will connect using their Microsoft account and will then be able to send an email that will be sent through their Microsoft email address.
I was able to set the authentication without any issue, but now that I try sending an email, it is not working, and I suspect it is because I don't have the required permission in Azure for my app.
I tried adding the GRAPH permission for Mail.Send, but unfortunately only two options are showing:
What I am missing to be able to see and add the other types of permissions?
I tried setting up a completely new app and that didn't solve my issue.
If your app registration is created in B2C tenant supporting user flows, it contains only Microsoft Graph offline_access and openid as Delegated
permissions.
Initially, I created one application in Azure AD B2C tenant with supported account type as "Accounts in any identity provider or organizational directory (for authenticating users with user flows)":
These type of applications won't be having Delegated Microsoft Graph permissions other than offline_access
and openid
as below:
To resolve this, you need to switch to normal Azure AD tenant and create application with supported account type as "Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox)":
You can add Mail.Send
Microsoft Graph permission of Delegated type in this application successfully as below: