question

XuKiki-4457 avatar image
0 Votes"
XuKiki-4457 asked Danstan-MSFT edited

Graph API CoreHttpProvider sendRequestInternal 404 error

I am getting following error when calling the graph api
https://docs.microsoft.com/en-us/graph/api/user-sendmail?view=graph-rest-1.0&tabs=http,using the client id& tenant id & secret key access token got through,
145484-image.png


microsoft-graph-mail
image.png (161.8 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

Danstan-MSFT avatar image
0 Votes"
Danstan-MSFT answered Danstan-MSFT edited

This error message means you are calling /me endpoint with an access token that contains application permissions. See Delegated and application permissions

In your case, you should call /users/{upn or user-id}/sendMail as there is no users signed in in your context.

If you need to call /me/sendMail then you should acquired an access token using on behalf of flow for example using Auth Code Flow and not Client Credentials flow.



5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.