UiPath Documentation
activities
latest
false
Activités d’automatisation informatique
Important :
Veuillez noter que ce contenu a été localisé en partie à l’aide de la traduction automatique. La localisation du contenu nouvellement publié peut prendre 1 à 2 semaines avant d’être disponible.

Intégration des employés

Créez un nouvel utilisateur de NetIQ eDirectory et ajoutez-le au service et au groupe appropriés à l’aide de UiPath.NetIQeDirectory.Activities.

L'exemple ci-dessous explique comment créer un nouvel utilisateur d'annuaire et l'ajouter au service et au groupe associés.

Il contient des activités telles que NetIQ eDirectory Scope, Create User, Force Password Change ou Add User To Group. Vous pouvez retrouver ces activités dans le package UiPath.NetIQeDirectory.Activities .

Création du workflow

Les packages suivants doivent être installés avant de créer le workflow ci-dessous :

  • UiPath.NetIQeDirectory.Activities
  • UiPath.System.Activities
  • UiPath.WebApi.Activities

Voici comment le processus d'automatisation peut être créé :

  1. Ouvrez Studio et créez un nouveau Processus nommé par défaut Principal.

  2. Drag a Sequence container into the Workflow Designer and name it Main Sequence.

  3. Select the Main Sequence container and create the following variable:

    Nom de variableTypes de variablesValeur par défaut
    ldapServerChaîne de caractères (string)
    ldapAdminUserChaîne de caractères (string)
    ldapAdminPasswordChaîne de caractères (string)
  4. Drag another sequence inside the Main Sequence container and name it Init Sequence.

  5. Drag a Get Robot Asset activity inside the Init Sequence container.

    • Add the variable "LdapServer" inside the Asset Name field.
    • Add the variable ldapServer inside the Asset value field.
  6. Drag a Get Robot Credentials activity below the Get Robot Asset activity.

    • Add the variable "LdapServerCredentials" inside the Asset Name field.
  7. Drag another sequence below the Init Sequence container and name it CreateUser Sequence.

  8. Select the CreateUser Sequence container and create the following variable:

    Nom de variableTypes de variablesValeur par défaut
    userAttributesDtChaîne de caractères (string)
    userInitialPasswordChaîne de caractères (string)
    userSAMAccountNameChaîne de caractères (string)
    userLocationChaîne de caractères (string)
    userCNChaîne de caractères (string)
    userExistsBooléen
    employeesGroupChaîne de caractères (string)
    userDepartmentGroupChaîne de caractères (string)
  9. Drag another Sequence inside the CreateUser Sequence container and name it Set User Attributes Sequence

  10. Drag a Multiple Assign activity inside the Set User Attributes Sequence container.

    • Ajoutez la variable userCN dans le champ À.
    • Ajoutez l’expression FirstName+" "+LastName dans le champ Valeur.
    • Click the Add button to add another Assign row, and add the variable userSAMAccountName in the To field.
    • Ajoutez l’expression (FirstName+"."+LastName).ToLower dans le champ Valeur.
    • Click the Add button to add another Assign row, and add the variable userInitialPassword in the To field.
    • Ajoutez l’expression "1qazXSW@" dans le champ Valeur.
    • Click the Add button to add another Assign row, and add the variable employeesGroup in the To field.
    • Ajoutez l’expression "CN=Employees,OU=Employee-Onboarding,OU=Demo,DC=dev1,DC=local" dans le champ Valeur.
  11. Drag a Sequence container below the Multiple Assign activity and name it DT Set Extra Attributes Sequence.

  12. Drag a Build Data Table activity inside the DT Set Extra Attributes Sequence container.

    • In the Properties panel, add the variable userAttributesDt in the DataTable field.
  13. Drag a Add Data Row activity below the Build Data Table activity.

    • Add the expression {"givenName",FirstName} in the ArrayRow field.
    • Ajoutez la variable userAttributesDt dans le champ Table de données.
  14. Drag another Add Data Row activity below the previous Add Data Row activity.

    • Add the expression {"sn",LastName} in the ArrayRow field.
    • Ajoutez la variable userAttributesDt dans le champ Table de données.
  15. Drag another Add Data Row activity below the previous Add Data Row activity.

    • Add the expression {"department",Department} in the ArrayRow field.
    • Ajoutez la variable userAttributesDt dans le champ Table de données.
  16. Drag another Add Data Row activity below the previous Add Data Row activity.

    • Add the expression {"title",Title} in the ArrayRow field.
    • Ajoutez la variable userAttributesDt dans le champ Table de données.
  17. Drag another Add Data Row activity below the previous Add Data Row activity.

    • Add the expression {"telephoneNumber",Telephone} in the ArrayRow field.
    • Ajoutez la variable userAttributesDt dans le champ Table de données.
  18. Drag another Add Data Row activity below the previous Add Data Row activity.

    • Add the expression {"mail",Email} in the ArrayRow field.
    • Ajoutez la variable userAttributesDt dans le champ Table de données.
  19. Drag a Switch activity below the DT Set Extra Attributes Sequence container.

    • Add the value Department in the Expression field.
    • Click the Add new case field and add the value Marketing in the Case field.
    • Click the Add new case field and add the value Sales in the Case field.
    • Click the Add new case field and add the value Legal in the Case field.
    • Click the Add new case field and add the value Accounting in the Case field.
  20. Add a Multiple Assign activity inside the Marketing Case container.

    • Ajoutez la variable userLocation dans le champ À.
    • Ajoutez l’expression "OU=Marketing,OU=Employee-Onboarding,OU=Demo,DC=dev1,DC=local" dans le champ Valeur.
    • Click the Add button and add the variable userDepartmentGroup in the To field.
    • Ajoutez l’expression "CN=DepartmentMarketing,OU=Marketing,OU=Employee-Onboarding,OU=Demo,DC=dev1,DC=local" dans le champ Valeur.
  21. Add a Multiple Assign activity inside the Sales Case container.

    • Ajoutez la variable userLocation dans le champ À.
    • Ajoutez l’expression "OU=Sales,OU=Employee-Onboarding,OU=Demo,DC=dev1,DC=local" dans le champ Valeur.
    • Click the Add button and add the variable userDepartmentGroup in the To field.
    • Ajoutez l’expression "CN=DepartmentSales,OU=Sales,OU=Employee-Onboarding,OU=Demo,DC=dev1,DC=local" dans le champ Valeur.
  22. Add a Multiple Assign activity inside the Legal Case container.

    • Ajoutez la variable userLocation dans le champ À.
    • Ajoutez l’expression "OU=Legal,OU=Employee-Onboarding,OU=Demo,DC=dev1,DC=local" dans le champ Valeur.
    • Click the Add button and add the variable userDepartmentGroup in the To field.
    • Ajoutez l’expression "CN=DepartmentLegal,OU=Legal,OU=Employee-Onboarding,OU=Demo,DC=dev1,DC=local" dans le champ Valeur.
  23. Add a Multiple Assign activity inside the Accounting Case container.

    • Ajoutez la variable userLocation dans le champ À.
    • Ajoutez l’expression "OU=Legal,OU=Employee-Onboarding,OU=Demo,DC=dev1,DC=local" dans le champ Valeur.
    • Click the Add button and add the variable userDepartmentGroup in the To field.
    • Ajoutez l’expression "CN=DepartmentLegal,OU=Legal,OU=Employee-Onboarding,OU=Demo,DC=dev1,DC=local" dans le champ Valeur.
  24. Add a NetIQ eDirectory Scope activity below the Set user Attributes Sequence container.

    • In the Properties panel, select the LDAP option from the dropdown list.
    • Add the variable ldapServer in the LDAPServer field.
    • Add the variable ldapAdminPassword in the Password field.
    • Add the variable ldapAdminUser in the Username field.
  25. Drag a NetIQ eDirectory User Exists activity inside the NetIQ eDirectory Scope activity.

    • Select the SAMAccountName option from the dropdown list.
    • Ajoutez la variable userSAMAccountName dans le champ Valeur (Value).
  26. Drag an If activity below the NetIQ eDirectory User Exists activity.

    • Ajoutez l’expression Not userExists dans le champ Condition.
  27. Drag a Sequence activity inside the Then container.

  28. Drag a NetIQ eDirectory Create User activity inside the Seqence container.

    • Add the variable userLocation in the Location field.
    • Add the variable userSAMAccountName in the SAMAccountName field.
    • Add the variable userInitialPassword in the Password field.
  29. Drag a NetIQ eDirectory Force Password Change activity below the NetIQ eDirectory Create User activity.

    • Add the variable userDN in the DistinguishedName field.
  30. Drag a NetIQ eDirectory Add User To Group activity below the NetIQ eDirectory Force Password Change activity.

    • Add the variable userDN in the UserDistinguishedName field.
    • Add the variable employeesGroup in the GroupDistinguishedName field.
  31. Drag a NetIQ eDirectory Add User To Group activity below the previous NetIQ eDirectory Add User To Group activity.

    • Add the variable userDN in the UserDistinguishedName field.
    • Add the variable userDepartmentGroup in the GroupDistinguishedName field.
  32. Drag a Log Message activity below the NetIQ eDirectory Add User To Group activity.

    • Select the Info option from the dropdown list.
    • Ajoutez l’expression "User Created: " + userSAMAccountName dans le champ Message.
  33. Drag a Sequence activity inside the Else container.

  34. Drag a Log Message activity inside the Sequence* container.

    • Select the Error option from the dropdown list.
    • Ajoutez l’expression "User already exists for sAMAccountName: " + userSAMAccountName dans le champ Message.
  35. Drag a Throw activity below the Log Message activity.

    • In the Properties panel, select the Error option from the dropdown button.
    • Ajoutez l’expression "User already exists for sAMAccountName: " + userSAMAccountName dans le champ Message.
  36. Exécutez le processus. Le robot crée un nouvel utilisateur d'annuaire et l'ajoute à l'unité d'organisation et au groupe du service associé.

Voici à quoi devrait ressembler le workflow dans UiPath Studio :

Voici le résultat de l'exécution du workflow :

  • Création du workflow

Cette page vous a-t-elle été utile ?

Connecter

Besoin d'aide ? Assistance

Vous souhaitez apprendre ? UiPath Academy

Vous avez des questions ? UiPath Forum

Rester à jour