Skip to main content

HelloID

Retrieve permissions script

When the Use Script To Retrieve Permissions toggle is enabled, the Retrieve Permissions Script defines the Standard permissions in a permission set.

Use this script if you're creating a large number (~>10) of standard permissions, or if you don't know them in advance and need to make API calls into the target system to retrieve them. Otherwise, it's easier to disable the Use Script To Retrieve Permissions toggle and define your standard permissions manually.

Each permission must be defined as a hash table with the following properties:

@{
    DisplayName    = "First permission"
    Identification = @{
        Reference = "Permission1"
    }
}
DisplayName

A string that identifies the Permission entitlements produced by the permission set.

Identification

A hash table that has one property, Reference.

Reference

A string that uniquely identifies the permission. HelloID subsequently passes these values into the Permission actions script(s) via $permissionReference (PowerShell v1) or $actionContext.References.Permission (PowerShell v2).

In PowerShell v1 systems, you should return your $permissions array to HelloID via Write-Output. In PowerShell v2 systems, you should instead add hash table objects to $outputContext.Permissions using the Add method, and do not explicitly return $outputContext.

This script must finish within 30 seconds.