Skip to main content

i want to disable a tab i have added to the form depending upon whether a user is in Azure Active Directory Security Group. I am working in SharePoint Online. I checked the K2 Management through K2 AppIt but dont know how to proceed.

There are 4 system SmartObjects used for querying information from directory services:  UMUser, UMGroup, UMRole, and UMLabel.  The UM part stands for User Management.   These system SmartObjects are very handy for finding user properties and group membership for any security label.

 

To determine if the current user opening the form is a member of a group, you could add some conditions and rules to the form initializing event.  Invoke the UMUser.FindUserGroups SmartObject method for the current user and the security label of 'AAD:' for Azure Active Directory.  Add a filter to the SmartObject call to specify the group you want check and store the output in a hidden data label.  If the user is a member of the specified group then that hidden data label will contain the group name.  If the user is not in that group, the data label will be empty.  You could add a rule condition checking if the hidden data label is empty and enable/ordisable the tab using the appropriate action.


 

 

Hi David,

 

thanks for the reply. Whether the UMUser, UMGroup are classes? Whether we should write code? 

 

Why this question. In another k2 blog we could find the steps to start with as options from K2 Management.

 

It will really help if you can provide the steps to start with and proceed.

 

Thanks in advance

 

 

 


Reply