https://github.com/tools4everbv/helloid-task-sa-source-activedirectory-accountgetdetails
Active Directory - User get attributes
https://github.com/tools4everbv/helloid-task-sa-source-activedirectory-accountgetdetails
active-directory data-source powershell service-automation
Last synced: over 1 year ago
JSON representation
Active Directory - User get attributes
- Host: GitHub
- URL: https://github.com/tools4everbv/helloid-task-sa-source-activedirectory-accountgetdetails
- Owner: Tools4everBV
- Created: 2024-01-08T14:13:14.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-31T08:50:23.000Z (over 2 years ago)
- Last Synced: 2025-01-08T10:45:08.984Z (over 1 year ago)
- Topics: active-directory, data-source, powershell, service-automation
- Language: PowerShell
- Homepage:
- Size: 26.4 KB
- Stars: 1
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# HelloID-Task-SA-Source-ActiveDirectory-AccountGetDetails
## Prerequisites
- [ ] The HelloID SA on-premises agent installed
- [ ] The ActiveDirectory module is installed on the server where the HelloID SA on-premises agent is running.
- [ ] Data source input parameter (required parameter) named `selectedUser`. The linked form-element should at least return a model containing the `UserPrincipalName` property
## Description
This code snippet executes the following tasks:
1. Define `$userPrincipalName` based on the `selectedUser` data source input `$dataSource.selectedUser.UserPrincipalName`
2. Imports the ActiveDirectory module.
3. Define a list of AD properties to retrieve from the AD user
3. Retrieve the configured AD user properties using the `Get-ADUser` cmdlet.
6. Return a hash table for each AD user property using the `Write-Output` cmdlet.
> To view an example of the data source output, please refer to the JSON code pasted below and select the `Interpreted as JSON` option in HelloID
```json
{
"UserPrincipalName": "a.acevedo@domain.local"
}
```