Nintex for SharePoint Forum
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
I'm trying to get "Query user profile" to return the "MemberOf" properties of a user. When I swap out "MemberOf" with "FirstName" it works. "MemberOf" doesn't return anything. I'm storing it into a collection variable and writing it to the log.
Overall, my goal is to find all of the AD Security Groups a user is a member of and then loop through that list to remove them for off boarding.
Thanks,
Hello Dean Pawley -
I would check out these threads as it is the same thing you are attempting to get to:Display Group Membership and Nintex Workflow - Ldap security query
Ultimately, try returning sAMAccountName rather than MemberOf if your query is something like:
Hope this helps!
I tried what you sent and it didn't quite work for me, but it did give me the clues I needed to get what I was looking for. So, thanks!
Ultimately, here's what I'm doing...
The query user profile is pulling from a person field on the form and placing it into a variable (var_DistinguishedName) as a single line of text.
The query LDAP is using the query (&(objectCategory=group)(member={WorkflowVariable:variable_DistinguidedName})) and putting the list in a collection variable (var_coll_MemberOf)
Then I placed it into the log to check the values, which looked good.
Then I sorted the collection just to make it easier to comparing the list to the Active Directory MemberOf list
The For Each loops the target var_coll_MemberOf and stores it into a variable var_GroupOf. I'll change the For Each to handle the action of Removing the account from AD.
If you're using the query LDAP, I think the attribute may be case sensitive. Try "memberOf" with a lowercase "m".
Thanks Brendan,
The above solution works. I'll detail the whole thing and share it on here if anyone else needs it.
Thanks!
Glad you got everything working Dean Pawley!
Be sure to mark your question as answered so others can quickly find what you did.
I created a pdf with screenshots; how can I upload it here?
If you open up the response in advance editor:
and then you can add attachments:
Hope this helps!