This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Get group memberships in process or script

Hi.

I have created a process and a script that creates users in a 3rd-party system (Mindflash) when the ADSAccount is added to a specific ADSGroup. This works fine now, but now I want to add the user to groups in this system based on group memberships in AD. How can i list all the groups a user is member of within a specific OU either as a parameter that can be passed to the script, or within the script itself?

 

This SQL-query lists what I want, but I'm not able to get it to work in Process Orchestration:

select ADSAccountInADSGroup.UID_ADSGroup
from ADSAccountInADSGroup, ADSGroup
where (ADSAccountInAdsGroup.UID_ADSGroup = ADSGroup.UID_ADSGroup
    and ADSGroup.CanonicalName like 'gk.no/Sikkerhets-gruppe/Foretak/%'
    and ADSAccountInAdsGroup.UID_ADSAccount = N'93411e51-152e-457b-8f99-1d6242748e26')
order by UID_ADSAccount, UID_ADSGroup

 

 

Current parameters collected in the process and passed to the scrtipt:

  • Base object: ADSAccountInADSGroupTotal
  • If user is added to ADSGroup "Mindflash_Users", run the script "Mindflash_AddUser" with the following parameters:
    • $FK(UID_ADSAccount).GivenName$
    • $FK(UID_ADSAccount).Surname$
    • $FK(UID_ADSAccount).UserPrincipalName$
    • $FK(UID_ADSAccount).FK(UID_Person).FK(UID_Profitcenter).Shortname$
    • $FK(UID_ADSAccount).FK(UID_Person).CustomProperty07$
    • $FK(UID_ADSAccount).FK(UID_Person).PersonalTitle$

The script then creates the user via json and the Mindflash-API