https://github.com/tools4everbv/helloid-task-sa-source-azureactivedirectory-groupsearch
Azure Active Directory - Group search
https://github.com/tools4everbv/helloid-task-sa-source-azureactivedirectory-groupsearch
azure-active-directory data-source powershell service-automation
Last synced: over 1 year ago
JSON representation
Azure Active Directory - Group search
- Host: GitHub
- URL: https://github.com/tools4everbv/helloid-task-sa-source-azureactivedirectory-groupsearch
- Owner: Tools4everBV
- Created: 2024-01-29T16:45:38.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-31T07:54:01.000Z (over 2 years ago)
- Last Synced: 2025-01-08T10:45:10.218Z (over 1 year ago)
- Topics: azure-active-directory, data-source, powershell, service-automation
- Language: PowerShell
- Homepage:
- Size: 27.3 KB
- Stars: 0
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# HelloID-Task-SA-Source-AzureActiveDirectory-GroupSearch
## Prerequisites
- [ ] This script uses the Microsoft Graph API and requires an App Registration with App permissions:
- [ ] Read all groups Group.Read.All
## Description
1. Define a wildcard search query `$searchQuery` based on the search parameter `$datasource.searchGroup`
2. Creates a token to connect to the Graph API.
3. List all groups in Azure AD using the API call: [List groups](https://learn.microsoft.com/en-us/graph/api/group-list?view=graph-rest-1.0&tabs=http)
4. Filter down to only users with `$searchQuery` in their `displayName` or `userPrincipalName`
5. Return a hash table for each user account using the `Write-Output` cmdlet.
> To view an example of the data source output, please refer to the JSON code pasted below.
```json
{
"searchGroup": "Group A"
}
```