Hello,
is it possible to make a rule in a form that checks if the current user is in a specific AD group?
regards,
Johann
Hello,
is it possible to make a rule in a form that checks if the current user is in a specific AD group?
regards,
Johann
Hello
There are some similar topics here on community about how to do that.
Please check this out: https://community.k2.com/t5/K2-Blackpearl-Forum-Posts/How-to-Check-current-system-user-whether-present-in-group-or-not/td-p/94964
Advanced condition: https://community.k2.com/t5/K2-Blackpearl-Forum-Posts/Advanced-Condition-to-check-upon-Initilization-if-user-is-a/td-p/72682
Should you find the above information useful kindly mark as "Accepted Solution and/or Kudo", as this will assist other community members looking for related information.
Regards,
BesM
[K2 will not accept any liability for any issues arising from actions taken in respect of the information provided by any forum member]
Hi Johan
The easiest way is to use the SystemManagementUserManagementSmartObjectsUMUser SmartObject > Get Group Users Method in an Execute a smartobject method rule. You can then use the Current user FQN as a filter and save the output to a Form parameter.
This Form Parameter can then be used in an advances condition.
If the parameter contains a value, the user is a member. If not, they are not a member.
Regards,
Thinus
Hello,
thanks for the links. This is how we already planned and tried to solve it but it never worked for us...I thought I am doing something wrong but I think instead it is a bug:
If we filter this results we get different results depending the group we put in.
Lets say we have two groups "group A" and "group B"
In "group A" the user "X" is a direct member and in "group B" the user "X" is meber of another group that is member in "group B" (not a direct member!)
Please Notice: for the Service Instance you have to set up "ResolveNestedGroups = True" to make this work
If you now fire the method "GetUserByGroup" for both groups you will get user "X" for both groups as a result. (the 2nd group only works after you set up the setting above)
But if you execute the method *and* filter the results (it does not matter how you filter!), the first group will still work but the "group B" will not work anymore...
Does anyone have these problems, too?
regards,
Johann
Hello
I am glad you managed to fix this and thanks for keeping us posted.
Regards,
Beswick
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.