Home

filting/restricting list items on the basis of user group in sharepoint online classic

%3CLINGO-SUB%20id%3D%22lingo-sub-1406559%22%20slang%3D%22en-US%22%3Efilting%2Frestricting%20list%20items%20on%20the%20basis%20of%20user%20group%20in%20sharepoint%20online%20classic%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1406559%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%3EI%20want%20to%20filter%20items%20of%20list%20library%20on%20the%20basis%20of%20sharepoint%20groups.%20users%20belong%20to%20one%20sharepoint%20group-IT%20can%20only%20see%20list%20items%20which%20having%20value%20in%20one%20column%20Vendor%3D'IT'%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%3Eusers%20belong%20to%20another%20sharepoint%20group%20-Finance%20can%20only%20see%20list%20items%20which%20having%20value%20in%20column%20Vendor%3D'finance'%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%3Ewhen%20user%20visit%20page%20he%20can%20only%20see%20list%20items%20which%20having%20value%20in%20column%20mapped%20with%20user%20group.%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%3Ehow%20can%20I%20achieve%20this%20in%20sharepoint%20online%20classic%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3Eplease%20find%20following%20article%20for%20solution%2Cwill%20it%20work%3F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fwww.crowcanyon.help%2Farticle%2F304%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.crowcanyon.help%2Farticle%2F304%2F%3C%2FA%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1406559%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ELists%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPermissions%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1407409%22%20slang%3D%22en-US%22%3ERe%3A%20filting%2Frestricting%20list%20items%20on%20the%20basis%20of%20user%20group%20in%20sharepoint%20online%20classic%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1407409%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F608122%22%20target%3D%22_blank%22%3E%40rautchetan%3C%2FA%3E%26nbsp%3BYou%20can%20achieve%20this%20by%20using%20item%20level%20permission%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EStart%20with%20creating%20let%202%20group%20%22IT%20Users%22%20and%20%22Finance%20Users%22%3C%2FP%3E%3CP%3EThen%20when%20item%20is%20getting%20created%20trigger%20a%20flow%20or%20workflow%20to%20set%20the%20permission%20for%20those%20groups%20accordingly.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESo%20you%20permission%20will%20look%20some%20thing%20like%20this%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EList%20level%20-%20Read%20access%20to%26nbsp%3B%22IT%20Users%22%20and%20%22Finance%20Users%22%3C%2FP%3E%3COL%3E%3CLI%3EItem%20Level%20IT%20items%20only%20%22IT%20Users%22%20group%20will%20have%20access%20-%20You%20can%20give%20read%2Fwrite%2Ffc%20as%20per%20your%20need%3C%2FLI%3E%3CLI%3EItem%20Level%20Finance%20items%20only%20%22Finance%20Users%22%20group%20will%20have%20access%20-%20You%20can%20give%20read%2Fwrite%2Ffc%20as%20per%20your%20need%3C%2FLI%3E%3C%2FOL%3E%3CP%3EHope%20this%20helps.%20Mark%20the%20response%20appropriately%20if%20it%20helps%20you%20achieve%20the%20solution.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3CP%3EVik%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1407494%22%20slang%3D%22en-US%22%3ERe%3A%20filting%2Frestricting%20list%20items%20on%20the%20basis%20of%20user%20group%20in%20sharepoint%20online%20classic%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1407494%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F394813%22%20target%3D%22_blank%22%3E%40Vikram_Samal%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eits%20not%20just%20about%20restricting%20access%2C%20I%20don't%20want%20to%20show%20list%20items%20which%20having%20different%20item%20groups.%3C%2FP%3E%3CP%3Eso%20IT%20sharepoint%20group%20user%20can%20see%20only%20IT%20list%20items%20and%20no%20other%20list%20item.%3C%2FP%3E%3CP%3Esimilarly%20Finance%20sharepoint%20group%20user%20can%20see%20only%20Finance%20list%20items%20and%20no%20other%20list%20items.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1407501%22%20slang%3D%22en-US%22%3ERe%3A%20filting%2Frestricting%20list%20items%20on%20the%20basis%20of%20user%20group%20in%20sharepoint%20online%20classic%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1407501%22%20slang%3D%22en-US%22%3EYes%20I%20meant%20that%20when%20you%20will%20be%20allowing%20IT%20group%20permission%20remove%20others%20and%20same%20for%20others%20as%20well%20for%20finance%20items%20give%20only%20finance%20team%20permission.%20That%20will%20ensure%20the%20respective%20group%20will%20see%20only%20their%20items%20not%20others.%3CBR%20%2F%3E%3CBR%20%2F%3EVik%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1407530%22%20slang%3D%22en-US%22%3ERe%3A%20filting%2Frestricting%20list%20items%20on%20the%20basis%20of%20user%20group%20in%20sharepoint%20online%20classic%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1407530%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F394813%22%20target%3D%22_blank%22%3E%40Vikram_Samal%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ewhat%20about%20solution%2C%20mentioned%20in%20following%20link%2C%20its%20easy%20solution%20using%20CAML%20query%2C%20will%20it%20work%3F%3C%2FP%3E%3CP%3Eany%20idea%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fwww.crowcanyon.help%2Farticle%2F304%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.crowcanyon.help%2Farticle%2F304%2F%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1407541%22%20slang%3D%22en-US%22%3ERe%3A%20filting%2Frestricting%20list%20items%20on%20the%20basis%20of%20user%20group%20in%20sharepoint%20online%20classic%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1407541%22%20slang%3D%22en-US%22%3EThere%20are%20two%20aspects%20the%20solution%20you%20have%20shared%20one%20this%20is%20old%20will%20have%20lot%20of%20limitation%20using%20SharePoint%20designer%20approaches.%20Finally%20when%20you%20want%20to%20show%20and%20hide%20items%20you%20need%20to%20have%20the%20robust%20approach%20like%20item%20level%20permission%20which%20gives%20you%20100%25%20certainty%20of%20people%20having%20access%20on%20right%20items.%3CBR%20%2F%3E%3CBR%20%2F%3ESo%20if%20I%20will%20be%20in%20you%20place%20I%20will%20be%20inclined%20to%20the%20permission%20based%20approach%20as%20it%20will%20give%20peace%20of%20mind.%3CBR%20%2F%3E%3CBR%20%2F%3EThanks%3CBR%20%2F%3EVik%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1407588%22%20slang%3D%22en-US%22%3ERe%3A%20filting%2Frestricting%20list%20items%20on%20the%20basis%20of%20user%20group%20in%20sharepoint%20online%20classic%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1407588%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F394813%22%20target%3D%22_blank%22%3E%40Vikram_Samal%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20got%20it%2C%20thanks!%3C%2FP%3E%3CP%3Ebut%20my%20question%20is%20%2C%20I%20already%20have%20list%20items%2C%20how%20I%20will%20change%20there%20permissions%2C%20do%20I%20need%20it%20to%20do%20manually%2C%20assigned%20it%20to%20each%20sharepoint%20group.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1408155%22%20slang%3D%22en-US%22%3ERe%3A%20filting%2Frestricting%20list%20items%20on%20the%20basis%20of%20user%20group%20in%20sharepoint%20online%20classic%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1408155%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F394813%22%20target%3D%22_blank%22%3E%40Vikram_Samal%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ecan%20I%20put%20Recipients%20as%20SharePoint%20group%20name(please%20see%20attached%20image)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Edo%20I%20need%20to%20put%20it%20as%20IT_Group%40onmicrosoft.com%2C%20its%20not%20finding%20IT_group%20automatically%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1413382%22%20slang%3D%22en-US%22%3ERe%3A%20filting%2Frestricting%20list%20items%20on%20the%20basis%20of%20user%20group%20in%20sharepoint%20online%20classic%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1413382%22%20slang%3D%22en-US%22%3E%3CP%3E%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F394813%22%20target%3D%22_blank%22%3E%40Vikram_Samal%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20using%20following%20CAML%20query%20for%20filtering%20list%20%2C%20but%20its%20not%20showing%20correct%20filter%20data%2C%20whats%20issue%20in%20this%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CAND%3E%3CMEMBERSHIP%20type%3D%22%26quot%3BCurrentUserGroups%26quot%3B%22%3E%3CFIELDREF%20name%3D%22%26quot%3BVendor%26quot%3B%2F%22%3E%3C%2FFIELDREF%3E%3C%2FMEMBERSHIP%3E%3C%2FAND%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1423921%22%20slang%3D%22en-US%22%3ERe%3A%20filting%2Frestricting%20list%20items%20on%20the%20basis%20of%20user%20group%20in%20sharepoint%20online%20classic%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1423921%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F608122%22%20target%3D%22_blank%22%3E%40rautchetan%3C%2FA%3E%26nbsp%3BSorry%20for%20delay%20in%20reply%20you%20can%20set%20up%20a%20MS%20flow%20where%20you%20can%20set%20up%20condition%20which%20group%20should%20have%20permission%20and%20you%20can%20add%20some%20conditional%20block%20saying%20if%20IT%20which%20group%20should%20be%20given%20if%20finance%20which%20group%20should%20be%20given%20permission.%20I%20have%20shown%20how%20you%20can%20implement%20using%20flow%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Vikram_Samal_0-1590676527737.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F195053iDEC564EB2733079E%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22Vikram_Samal_0-1590676527737.png%22%20alt%3D%22Vikram_Samal_0-1590676527737.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHopefully%20this%20helps.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3CP%3EVik%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Contributor

I want to filter items of list library on the basis of sharepoint groups. users belong to one sharepoint group-IT can only see list items which having value in one column Vendor='IT'

users belong to another sharepoint group -Finance can only see list items which having value in column Vendor='finance'

when user visit page he can only see list items which having value in column mapped with user group.

how can I achieve this in sharepoint online classic

 

please find following article for solution,will it work?

 

https://www.crowcanyon.help/article/304/

9 Replies
Highlighted

@rautchetan You can achieve this by using item level permission

 

Start with creating let 2 group "IT Users" and "Finance Users"

Then when item is getting created trigger a flow or workflow to set the permission for those groups accordingly.

 

So you permission will look some thing like this:

 

List level - Read access to "IT Users" and "Finance Users"

  1. Item Level IT items only "IT Users" group will have access - You can give read/write/fc as per your need
  2. Item Level Finance items only "Finance Users" group will have access - You can give read/write/fc as per your need

Hope this helps. Mark the response appropriately if it helps you achieve the solution.

 

Thanks

Vik

Highlighted

@Vikram_Samal 

 

Hi,

 

its not just about restricting access, I don't want to show list items which having different item groups.

so IT sharepoint group user can see only IT list items and no other list item.

similarly Finance sharepoint group user can see only Finance list items and no other list items.

Highlighted
Yes I meant that when you will be allowing IT group permission remove others and same for others as well for finance items give only finance team permission. That will ensure the respective group will see only their items not others.

Vik
Highlighted

@Vikram_Samal 

 

what about solution, mentioned in following link, its easy solution using CAML query, will it work?

any idea?

 

https://www.crowcanyon.help/article/304/

Highlighted
There are two aspects the solution you have shared one this is old will have lot of limitation using SharePoint designer approaches. Finally when you want to show and hide items you need to have the robust approach like item level permission which gives you 100% certainty of people having access on right items.

So if I will be in you place I will be inclined to the permission based approach as it will give peace of mind.

Thanks
Vik
Highlighted

@Vikram_Samal 

 

I got it, thanks!

but my question is , I already have list items, how I will change there permissions, do I need it to do manually, assigned it to each sharepoint group.

Highlighted

@Vikram_Samal 

 

can I put Recipients as SharePoint group name(please see attached image)

 

do I need to put it as IT_Group@onmicrosoft.com, its not finding IT_group automatically

Highlighted

 @Vikram_Samal 

 

I am using following CAML query for filtering list , but its not showing correct filter data, whats issue in this

 

<And><Membership Type="CurrentUserGroups"><FieldRef Name="Vendor"/></Membership></And>

Highlighted

@rautchetan Sorry for delay in reply you can set up a MS flow where you can set up condition which group should have permission and you can add some conditional block saying if IT which group should be given if finance which group should be given permission. I have shown how you can implement using flow:

Vikram_Samal_0-1590676527737.png

 

Hopefully this helps.

 

Thanks

Vik