401 on graph /sendMail API

xiao xiao 0 Reputation points
2025-12-14T13:26:11.7833333+00:00

个人邮箱,权限都配置好了。

现在发邮件是一定要企业邮箱,且有许可证吗?
Graph API:

1、发邮件接口测试成功
User's image

2、获取access_token成功:

https://login.microsoftonline.com/{tenantId}/oauth2/v2.0/token
scope = https://graph.microsoft.com/.default

3、获取用户接口成功:

https://graph.microsoft.com/v1.0/users/{email}

4、发邮件接口报错401

https://graph.microsoft.com/v1.0/users/{email}/sendMail
Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.