Skip to main content

HelloID

Use a code snippet in a product action
  1. Add a product action (steps 1 - 5).

  2. Click the Code snippet library tab.

    2023-09-25_13-15-55.jpg

    When you are adding a product action (on the Actions - new tab), the code snippet library gives access to all PowerShell product action snippets on GitHub.

  3. On the Code snippet library tab you can search for PowerShell snippets. For detailed instructions, see Code snippet library.

    Tip

    Click the title of a snippet to view its code, readme file, and release notes.

  4. Click the snippet's Copy to clipboard button, paste the code into the editor, and click Save.

    2023-09-25_13-51-55.jpg
  5. Most snippets require you to create and link a dynamic form to the product, to collect the needed values for $formObject. Each snippet's readme file contains sample JSON that describes what the form needs to collect.

    For example, the "Azure Active Directory - User account update manager" snippet requires a UserIdentity, a UserPrincipalName, and a ManagerIdentity:

    2023-09-26_10-26-15.jpg

    To create and link a form:

    1. Add a dynamic form with the necessary Form elements to capture the input values for the snippet. For example, the above snippet would need two appropriately scoped User Selector elements. If needed, use Data sources to populate your elements.

    2. Link the form to the product.

  6. Customize the code of the product action; see Add a product action (step 8).