SOLVED

Using MS Teams group in Exchange Online mail rule.

Brass Contributor

Hi Everyone,

 

I would like to build a mailflow rule based on a group membership, however I would like this group to be MS Teams groups, so if a user is a member of X Team, rule will apply, however I am not able to see any Team group on a list. I have securityenabled this group - no luck, still not there.

 

Is anyone aware of if/how this can be achieved? Basically what I would like to have is a mail rule based on a group membership where users would be able to add themselves (and only themselves) there and remove as well - so they can decide whether the solution works for them or not. I was thinking about Team membership - easy for users to add and remove themselves.

 

Any ideas appreciated,

 

Cheers,

J

2 Replies
best response confirmed by Pawel Jarosz (Brass Contributor)
Solution
According to the documentation (https://docs.microsoft.com/en-us/exchange/security-and-compliance/mail-flow-rules/conditions-and-exc...), M365 Groups should be supported for this condition, however the UI bits in the EAC do not expose them, so you will have to use PowerShell. Refer to the article above for the exact parameter you need (most likely -FromMemberOf).
Dear Vasil!! It worked out! If you ever in Poland (Wroclaw city) give me a shout we go for a beer! Few words of explanation why I am interested in this - wanted to give ability for people for have certain dislaimers added to their emails if they add themselves to the group.
1 best response

Accepted Solutions
best response confirmed by Pawel Jarosz (Brass Contributor)
Solution
According to the documentation (https://docs.microsoft.com/en-us/exchange/security-and-compliance/mail-flow-rules/conditions-and-exc...), M365 Groups should be supported for this condition, however the UI bits in the EAC do not expose them, so you will have to use PowerShell. Refer to the article above for the exact parameter you need (most likely -FromMemberOf).

View solution in original post