Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tools4everbv/helloid-task-sa-target-helloid-usergrantmembership
HelloID - User grant group membership
https://github.com/tools4everbv/helloid-task-sa-target-helloid-usergrantmembership
delegated-form helloid powershell product service-automation task
Last synced: about 2 months ago
JSON representation
HelloID - User grant group membership
- Host: GitHub
- URL: https://github.com/tools4everbv/helloid-task-sa-target-helloid-usergrantmembership
- Owner: Tools4everBV
- Created: 2023-11-20T11:10:22.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-15T14:18:21.000Z (12 months ago)
- Last Synced: 2024-01-15T18:41:01.605Z (12 months ago)
- Topics: delegated-form, helloid, powershell, product, service-automation, task
- Language: PowerShell
- Homepage:
- Size: 21.5 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# HelloID-Task-SA-Target-HelloID-UserGrantMembership
## Prerequisites
- [ ] HelloID API key and secret
- [ ] Pre-defined variables: `portalBaseUrl`, `portalApiKey` and `portalApiSecret` created in your HelloID portal.## Description
This code snippet will add an existing user to a group within HelloID and executes the following tasks:1. Define a hash table `$formObject`. The keys of the hash table represent the properties necessary to add an existing user to a group within `HelloID`, while the values represent the values entered in the form.
> To view an example of the form output, please refer to the JSON code pasted below.
```json
{
"userGUID": "00f793c8-32ae-4f19-8e33-3ac1f0858a98",
"userName": "john.doe",
"groupGUID": "9509133d-8ae4-48bf-a2cb-e0f31cae4deb",
"groupName": "John Doe's group"
}
```> :exclamation: It is important to note that the names of your form fields might differ. Ensure that the `$formObject` hash table is appropriately adjusted to match your form fields.
> [See the HelloID API Docs page](https://apidocs.helloid.com/docs/helloid/575c5cde6e378-link-a-user-to-a-group)2. Creates authorization headers using the provided API key and secret.
3. Add an existing user to a group using the: `Invoke-RestMethod` cmdlet. The hash table called: `$formObject` is passed to the body of the: `Invoke-RestMethod` cmdlet as a JSON object.