Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tools4everbv/helloid-task-sa-source-azureactivedirectory-accountsearch

Azure Active Directory - User account search
https://github.com/tools4everbv/helloid-task-sa-source-azureactivedirectory-accountsearch

azure-active-directory data-source powershell service-automation

Last synced: 12 days ago
JSON representation

Azure Active Directory - User account search

Awesome Lists containing this project

README

        

# HelloID-Task-SA-Source-AzureActiveDirectory-AccountSearch

## Prerequisites
- [ ] This script uses the Microsoft Graph API and requires an App Registration with App permissions:
- [ ] Read all user’s full profiles by using User.Read.All

## Description

This code snippet executes the following tasks:

1. Define a wildcard search query `$searchQuery` based on the search parameter `$datasource.searchUser`
2. Creates a token to connect to the Graph API.
3. List all users in Azure AD using the API call: [List users](https://learn.microsoft.com/en-us/graph/api/user-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
{
"searchUser": "James"
}
```