1

I want to show Mail-Enable security Group Names in select tag.

Can someone please tell how can I get the group names using SPFx react?

4
  • does below solution help you in any way? Aug 1 at 8:08
  • I tried this solution ,but it didn't worked for me.
    – Renuka
    Aug 1 at 8:10
  • Are you facing any issue while using it? Aug 1 at 8:25
  • thank you so much for helping me, when I tried this solution , it shows an error 'Page Not Found' . Then I did it by adding all group names in a list. After that I didn't work on this solution.
    – Renuka
    Aug 1 at 9:30

1 Answer 1

0

You have to use the Microsoft Graph APIs to get the details of Mail-enabled security groups.

For example:

You can use the query endpoint like below:

https://graph.microsoft.com/v1.0/groups?$filter=mailEnabled eq true and securityEnabled eq true

Documentation: Working with groups in Microsoft Graph

Also, check this documentation: Consume the Microsoft Graph in the SharePoint Framework

This may return mail enabled M365 groups as well. Usually M365 groups have 'Unified' value in groupType property. So you can filter results based on this property in your code to exclude M365 groups from results array.

Similar thread (not worked for me): Query Mail Enabled Security group from Graph API .net SDK

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.