Skip to content

Tools4everBV/HelloID-Conn-SA-Source-HelloID-DelegatedForms

Repository files navigation

HelloID-Conn-SA-Source-HelloID-DelegatedForms

Description

This HelloID Service Automation Powershell script generates a complete set of files including an "All-in-one Powershell script" for the provided delegated form.

Versioning

Version Description Date
1.1.0 Added support for new Delegated Form task using SA (cloud) Agent 2022/02/20
1.0.2 Fixed return empty array using PowerShell Core 2021/11/2
1.0.1 Added version number 2021/10/27
1.0.0 Initial release 2021/01/08

Table of Contents

Script outcome

After configuring and running the "generate-all-in-one.ps1" script the following outcome will be automaticly generated.

FileDescription
All-in-one setup\createform.ps1An All-in-one PS script to generate (import) the complete Delegated form and required resources into you HelloID portal using API calls
Manual resources\[task]_<task-name>.ps1Powershell task connected to Delegated From
Manual resources\[task]_<task-name>.config.jsonPowerShell task config. Only for new Tasks using the SA (cloud) Agent
Manual resources\[task]_<task-name>.mapping.jsonVariable mapping of Powershell task connected to Delegated From. Only for old Autmation Tasks not using the SA (cloud) Agent
Manual resources\dynamicform.jsomJSON form structure of the Dynamic form
Manual resources\[datasource]_<datasource-name>.jsonJSON data structure used for Static data sources (only)
Manual resources\[datasource]_<datasource-name>.ps1Powershell script from Task Data source or Powershell data source
Manual resources\[datasource]_<datasource-name>.model.jsonData source model definition
Manual resources\[datasource]_<datasource-name>.inputs.jsonData source input configuration

PowerShell setup script

The PowerShell script "generate-all-in-one.ps1" contains a complete PowerShell script using the HelloID API to create an all-in-one script and exporting manual resource files (see table above). Please follow the steps below in order to setup and run the "generate-all-in-one.ps1" PowerShell script in your own environment.

  1. Download the "generate-all-in-one.ps1" file
  2. Open it in your favorite PowerShell console/editor
  3. Create a HelloID API key and secret
  4. Update the connection and configuration details in the script's header
  5. Run the script on a machine with PowerShell support and an internet connection

Update connection and configuration details

Variable nameExample valueDescription
$script:PortalBaseUrlhttps://customer01.helloid.comYour HelloID portal's URL
$apiKey*****API Key value of your own environment
$apiSecret*****API secret value of your own environment
$delegatedFormNameAD Account - CreateName of the Delegated Form you want to export
$useManualDelegatedFormCategories$true$true means use manual categories listed below. $false means receive current categories from DelegatedForm
$manualDelegatedFormCategories@("Active Directory", "User Management")Array of Delegated Form categories to be connected to the newly generated Delegated Form. Only unique names are supported. Categories will be created if they don't exists
$defaultDelegatedFormAccessGroupNames@("Users", "HID_administrators")Array of HelloID Group names to be connected as AccessGroups. Only unique names are supported. Group names have to exist.
$debug$falseBoolean value indicating debug mode. In Debug mode the HelloID resource names will get an suffix in order to "duplicate" the Delegated Form in the same environment (for testing)
$debugSuffix_tmpValue of the name suffix that will be used for all HelloID resources in debug modus.
$rootExportFolderC:\HelloID\Delegated FormsLocal folder path for exporting files

What is included?

The generated all-in-one PowerShell script includes the following resources

  1. All used Global variables
    • Based on variable name in used PowerShell scripts (Delegated Form task, Task data source and Powershell data source)
    • The current value is used when the global variable is not configured as secret
  2. All used data sources with the Dynamic Form
    • Internal buildin HelloID data sources (for example HelloID Groups)
    • Static data sources (including JSON data structure and model definition)
    • Task data sources (including Powershell Task, model definition and data source inputs)
    • Powershell data sources (including Powershell script, model definition and data source inputs)
  3. All used Powershell scripts
    • Delegated Form task (including variable mapping when using old Automation task)
    • Task data source Powershell Task
    • Powershell data source script
  4. Dynamic form JSON data structure
    • The data source references in the JSON data structure are dynamicly updated to your own environment
  5. Configured Access Groups are assigned to the Delegated form
  6. Configured Categories are assigned to the Delegated form
    • Manual configurated categories can be used or current categories connected to the referred Delegated Form
    • Categories are created if they don't exist in the target HelloID environment

Known limitations

  • Only global variables of type "string" are supported
  • Only script variable mappings of type "string" are supported
  • Powershel script template (use template instead of inline Powershell script) is not supported
  • Delegate Form Access Groups are not exported but are hardcoded in the generated script (you need to update them manually)

Getting help

If you need help, feel free to ask questions on our forum

HelloID Docs

The official HelloID documentation can be found at: https://docs.helloid.com/

About

HelloID - Export a delegated form

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published