Can Microsoft Flow/Automate (on behalf of SharePoint) retrieve the email addresses from members of a "Security" type group in Office 365?

So far I've tried:

  • Using the Office 365 Group connector's "List Group Members" action returns 'Invalid object identifier'. The security group does indeed appear in the Office 365 Admin Portal in the 'Groups' section; I was hopeful this one would just work.
  • Using the Send an HTTP request to SharePoint action with query /_api/web/sitegroups/getbyname('groupname')/users?$select=email returns Bad Gateway error "Group cannot be found.". These security groups are indeed used in SharePoint to manage permissions, but they are not themselves 'SharePoint groups', which probably explains why this method fails.
  • Using the Azure AD connector's "Get Group Members" action asks me to sign in with an account that has permissions. This is probably my last resort, as my organisation doesn't want to grant my service account a high level of permissions to Azure AD, when all the process needs to do is read-only retrieve email addresses from a small set of security groups.

Are there any options I'm not thinking of, or should I delve deeper into one of the above before giving up?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.