Using Graph API, How to get notification when user email security group received a new mail?

Roman Nimchuk 0 Reputation points
2025-02-11T12:59:15.58+00:00

We have a security group ******@domain.com
with N assigned emails to it.
Is it possible to create one subscription for all of them?
Like in this example, but for all users.

If it is not possible maybe it is possible to specify multiple emails in one subscriptions with something like this?

user/{id1},{id2}/messages

POST https://graph.microsoft.com/v1.0/subscriptions Content-type: application/json


{
   "changeType": "created",
   
   "resource": "
user/{id}/messages
",
   "expirationDateTime":"2016-11-20T18:23:45.9356913Z",
   "clientState": "secretClientValue",
   "latestSupportedTlsVersion": "v1_2"
}
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
13,050 questions
Azure Event Grid
Azure Event Grid
An Azure event routing service designed for high availability, consistent performance, and dynamic scale.
424 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Saranya Madhu-MSFT 1,425 Reputation points Microsoft Vendor
    2025-02-12T02:37:46.8433333+00:00

    Hi Roman Nimchuk,

    Thanks for reaching out to Microsoft!

    Creating a single subscription for multiple users in Microsoft Graph API is not directly supported. With respect to group, you can subscribe to changes in a specific group using the /groups/{id} resource to receive change notifications. This approach allows you to monitor changes within a group, such as when members are added or removed, or when group properties are updated.

    Currently, it is not possible to receive notifications for new emails in a security group using Subscription Graph API. Create subscription Graph API does not support subscribing to email events for groups. Since this feature/functionality is presently not available, you can submit a feature request idea using this support link, which will be monitored by Microsoft team and make the enhancements to Microsoft Graph APIs. I will also upvote for you. 

    Change Notifications supported resources

    Hope this helps.

    If the answer is helpful, please click Accept Answer and kindly upvote. If you have any further questions about this answer, please click Comment.

    0 comments No comments

Your answer

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