Hi @Radim Wittmann,
There are two ways to access another user's mailbox:
- Grant the app application permission, and once the token is obtained through the client credential flow, it can access the other user's mailbox.
- the app has the appropriate delegated permission from one user, and another user has shared a mail folder with that user, or, has given delegated access to that user.
As you can see from your issue description, the second method is used, but the error occurs because the other user is not sharing the mailbox or has not given delegated access to that user, so add a shared folder or delegate another user to act on your behalf.
If you want to know more detailed information, you can check out this link:
https://learn.microsoft.com/en-us/graph/api/user-sendmail?view=graph-rest-1.0&tabs=csharp
Hope this helps.
If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.