Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
Hello Angelia,
You can confirm the permissions and consent in the app registration itself:
- In the Microsoft Entra admin center, go to App registrations and open the Fluent SMTP app you created.
- Select API permissions.
- Check that Microsoft Graph -> Mail.Send is listed.
- Look at the Type and Status columns:
- Status should show Granted for (your tenant) with a green check. If it doesn’t, an admin needs to select Grant admin consent.
- Type matters. Per the Graph permissions reference, the Application version of Mail.Send requires admin consent and sends as any user. The Delegated version doesn’t need admin consent and sends as the signed-in user.
- Status should show Granted for (your tenant) with a green check. If it doesn’t, an admin needs to select Grant admin consent.
The “unauthorized” error often comes from a mismatch between the permission type and the sign-in flow:
- An Application permission only works with a token from the client credentials flow. A user sign-in (delegated) token won’t carry it, and you get 401.
- A Delegated permission only works with a token from a user sign-in.
Make sure the permission type you added matches the connection type Fluent SMTP uses for Microsoft.
To check what your token contains, decode it at jwt.ms. An application token shows Mail.Send in the roles claim. A delegated token shows it in the scp claim.
If you’re sending as a mailbox using an Application permission, that mailbox must exist in Exchange Online. An admin can also limit which mailboxes the app can use with an application access policy.
A similar thread with an accepted answer: Not able to send mail
If it still fails, please share the exact error text and where it appears (plugin test or Azure).
Please click Accept Answer and upvote if this helped.