Solved

Get Members of a SharePoint Group

  • 26 October 2022
  • 7 replies
  • 102 views

Userlevel 1
Badge +4

This workflow action is not correctly pulling up custom SharePoint groups I've added to my site. It's only pulling up the default Owners, Members, and Visitors group.

 

I've added several new custom groups to my site, and the account used in the SharePoint Online connection is part of the owners group that owns these groups. Yet, the drop-down doesn't display these additional groups. It only shows the Owners, Members, and Visitors groups.

 

Seems like this is a bug.

icon

Best answer by jeffoliver1000 28 October 2022, 23:28

View original

7 replies

Userlevel 4
Badge +12

Hi @jeffoliver1000 


worked for me.



 


It's not explicitly stated in the  sharepoint online connection help page under 'Authentication Methods for SharePoint online connection' but it used the 'SharePoint Online: List and libraries' method.


SharePoint Online (nintex.com)


You could try creating a new connection with that auth method type and see if that works.

Userlevel 1
Badge +4

I'm already using that connection type. I can already see me Members, Owners, and Visitors groups. Just none of the additional ones I've created. It's like there's a permissions issue with the NWC not seeing these new ones.

Userlevel 4
Badge +12

Lets see if there is a difference on the sharepoint side.


I'm using a site template of 'Team site no Microsoft 365 group'.


Single site collection no subsites. My custom group was created in the site permissions at the site collection level / top site (this is a given with no subsites). I applied the read permission level to the 'Test Custom Group'.


 


Would you be able to share a screenshot of your site permissions and describe the templates / site structure.


 


Another thing to try would be to create a new site collection using the Communication template, create a new sharepoint group in that and give that a test.

Userlevel 1
Badge +4

I created a new site collection using the Communication Site template. Next, I created a custom group:


 



This group is not available in the workflow action:



 


 

Userlevel 1
Badge +4

So I did some more testing and discovered what's going on here. Groups will only appear in the workflow action if the groups are given permissions to the site when they are created. The groups I created don't have access to the site. I don't want them to. I use these groups to give explicit permissions to list items and documents via a workflow. So the only groups that will appear in the workflow actions are groups that have permissions to the site:


 



 


This is clearly a bug. The workflow action should pull all groups from the _layouts/15/groups.aspx page, regardless if they have permissions to the site or not.

Userlevel 4
Badge +12

Thanks for the further testing @jeffoliver1000 


Good to know the limitations.


If you feel this is a bug you could raise it via a support ticket and see if they escalate it to dev.


I don't know which API method is being used to generate the list of groups for a site but it may be a limiation of the sharepoint API being used.


 


As a interim work around and you'll need to test this..


Could you create a new permission level with very restricted rights, eg just tick view application pages. (or select what you are happy with), then add that group to the site with that new permission level. See if that group then shows up on the action.

Userlevel 1
Badge +4

I recreated my custom groups and gave them site permissions. I will deal with the permissions issues via additional workflow actions in my workflow. It's a hassle and workaround for now since I don't have time for this issue to get resolved by Nintex. 

Reply