Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
10 replies
Subscribers
9 subscribers
Views
7949 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
I want group membership of user of type system administrator. I used
kaushikr276
A Score Level 2
over 8 years ago
I want group membership of user of type system administrator.
I used getgroupsformemberuser() to get list of groups where user is member.
I used getgroupsforadminuser() to get list of groups that a given user is an administrator but it returns system groups. For basic user, same function returns list of groups that a given user is an administrator.
Is there any other function i can use?
OriginalPostID-215085
OriginalPostID-215085
Discussion posts and replies are publicly visible
0
siddharthg837
over 8 years ago
Hi Kaushik,
You can first find out all users who are system administrator in your org, by the out of the box user attribute available to the Appian User object, which is "userTypeName". Once you have the list of these users with you - you can then find out their respective group membership.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Lakshmi Meyyappan
over 8 years ago
I do not believe there is a function to return the groups for which a system admin is an administrator. A system admin can perform the functions of an admin for every group, even if they are not explicitly added as an admin, so there usually isn't a need to return that list of groups. You can use the function isUserSystemAdministrator() to first check if the user is a system admin before running the getgroupsforadminuser() to ensure you don't get the system groups in your results.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Evan Rust
over 8 years ago
Can you store the list of system groups in a constant, run your query, and then take the difference? You can capture this logic in an expression rule for reuse.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sikhivahans
over 8 years ago
kaushikr I might be wrong but it seems like the API functions that get the groups by role are shipped with the limitation as per the documentation and so I opine that there can't be much we can do. And my views are inline with those said by @lakshmim.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
kaushikr276
A Score Level 2
over 8 years ago
@lakshmim @sikhivahans thanks for response.
even if i use function isUserSystemAdministrator() for not getting system groups how can i achieve my result to get list of groups that given user is an administrator.
Is it mean that i can't get groups at all for which a system admin is an administrato?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sikhivahans
over 8 years ago
@kaushikr Yep, the requirement of yours may not be achieved with the available OOTB functionalities or Shared Components.
Generally we look for API in these kind of situations in order to check for possibility of building a Shared Component, but at a high level, it's seeming to me that even the API functions are placing the limitation. The documentation at https://forum.appian.com/suite/help/16.2/api/com/appiancorp/suiteapi/personalization/GroupService.html#getGroupIdsForUserByRole-java.lang.String-java.lang.Integer- or https://forum.appian.com/suite/help/16.2/api/com/appiancorp/suiteapi/personalization/GroupService.html#getGroupsForUserByRole-java.lang.String-java.lang.Integer- indicates the same. Anyhow I am adding Eduardo as a participant to this post, so I believe he would be able to confirm on this.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
kaushikr276
A Score Level 2
over 8 years ago
@sikhivahans thanks for your help
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
venkateshs329
over 8 years ago
@ kaushikr276
You got any solution for it ?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
kaushikr276
A Score Level 2
over 8 years ago
@venkateshs329 No, I didn't get any solution for this :(
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Ben Anderson
over 6 years ago
To determine the system admins, you can run the following expression:
=load(
local!designerUsers: getdistinctusers(getgroupbyname("Designers")),
local!adminUsers: apply(fn!isusersystemadministrator,local!designerUsers),
index(local!designerUsers,where(local!adminUsers),{})
)
The default Designers group contains all system admins by rule, but non-admin users can be added to the group so the second step is needed.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel