Forum Discussion
Send Notification to user using delegated permissions
Abhi1222 - Messages in group chat will be visible to the group members hence you are getting the error. Unfortunately, Microsoft Graph API does not provide a direct way to trigger a notification to a person who is not a member of the group chat. However, you can add a user to the group chat using Graph API.
Please refer this example to Add a single member to a Microsoft Teams chat, sharing the whole history of the chat - https://learn.microsoft.com/en-us/graph/api/chat-post-members?view=graph-rest-1.0&tabs=http#example-3-add-a-single-member-to-a-microsoft-teams-chat-sharing-the-whole-history-of-the-chat.
- Abhi1222Feb 19, 2024Copper Contributor
As i mentioned in my post .. i am already adding a member to a conversation as per the link you suggested.
But i would like to notify member/members of that chat group that someone who is not part of conversation is trying to access the chat so the member of the chat can add the person.
I see few options like EventHubs / Webhooks etc .. should try and see how those can help .
- Meghana-MSFTFeb 20, 2024Former EmployeeYou can use webhooks but those work in channel scope only. You can use webhook notifications if your users are part of a teams channel and not group chat.
- Abhi1222Feb 20, 2024Copper ContributorIf we know the userId can't we notify them as an activity feed or something ?
https://www.youtube.com/watch?v=8a2fZ_wCgAk&list=TLPQMTkwMjIwMjRGJO_Ek3iNwQ&index=2
I came across this for now which i am trying to first see if it fits my use case.