Hello jgauffin,
Thank you for reaching out to Microsoft Support!
According to the documentation, "Mail.Read.Shared" and "Mail.Send.Shared" are delegated permissions, not application permissions.
You can use application permissions to send or read messages from a shared mailbox, but not just the shared mailbox, but the mailbox of all users in that tenant.
You can use the application permission to get the Mail in the shared mailbox, you need to add the permission is Mail.Read, the request path is as follows:
GET /users/{id | userPrincipalName}/messages
When using application permissions to Send Mail, you need to add permissions when Mail.Send, the request path is as follows:
POST /users/{id | userPrincipalName}/sendMail
For the function of listing all shared mailboxes, the Graph API does not provide such a function at present. You can obtain all user mailboxes by listing all user information, GET /users
, and select the mailbox you need for access.
Reference document:
https://learn.microsoft.com/en-us/graph/api/user-list-messages?view=graph-rest-1.0&tabs=http
https://learn.microsoft.com/en-us/graph/api/user-sendmail?view=graph-rest-1.0&tabs=http
Hope this helps.
If the answer is helpful, please click Accept Answer and kindly upvote it. If you have any further questions about this answer, please click Comment.