Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tools4everbv/helloid-conn-sa-full-azuread-accountcreate
Azure Active Directory - User account create
https://github.com/tools4everbv/helloid-conn-sa-full-azuread-accountcreate
azure-active-directory delegated-form import powershell service-automation
Last synced: about 2 months ago
JSON representation
Azure Active Directory - User account create
- Host: GitHub
- URL: https://github.com/tools4everbv/helloid-conn-sa-full-azuread-accountcreate
- Owner: Tools4everBV
- Created: 2021-09-02T10:36:34.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-01-10T11:20:40.000Z (12 months ago)
- Last Synced: 2024-01-10T12:36:54.889Z (12 months ago)
- Topics: azure-active-directory, delegated-form, import, powershell, service-automation
- Language: PowerShell
- Homepage:
- Size: 53.7 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Description
This HelloID Service Automation Delegated Form can create Azure users. The following options are available:
1. Select the employee type and enter a the details for the user
3. The displayname, surname, userprincipalname and mailare generated
7. After confirmation the user is created## Versioning
| Version | Description | Date |
| - | - | - |
| 1.1.1 | Updated with code for audit logging | 2022/08/16 |
| 1.1.0 | Updated with code for SA agent | 2022/03/14 |
| 1.0.1 | Added version number and updated all-in-one script | 2021/11/04 |
| 1.0.0 | Initial release | 2021/09/02 |## Requirements
This script uses the Microsoft Graph API and requires an App Registration with App permissions:
* Read and Write all user’s full profiles by using User.ReadWrite.All
* Read and Write all groups in an organization’s directory by using Group.ReadWrite.All
* Read and Write data to an organization’s directory by using Directory.ReadWrite.All
## Table of Contents
* [Description](#description)
* [Requirements](#requirements)
* [Introduction](#introduction)
* [Getting the Azure AD graph API access](#getting-the-azure-ad-graph-api-access)
* [Application Registration](#application-registration)
* [Configuring App Permissions](#configuring-app-permissions)
* [Authentication and Authorization](#authentication-and-authorization)
* [All-in-one PowerShell setup script](#all-in-one-powershell-setup-script)
* [Getting started](#getting-started)
* [Post-setup configuration](#post-setup-configuration)
* [Manual resources](#manual-resources)## Introduction
The interface to communicate with Microsoft Azure AD is through the Microsoft Graph API.## Getting the Azure AD graph API access
By using this connector you will have the ability to create an Azure AD User.
### Application Registration
The first step to connect to Graph API and make requests, is to register a new Azure Active Directory Application. The application is used to connect to the API and to manage permissions.* Navigate to App Registrations in Azure, and select “New Registration” (Azure Portal > Azure Active Directory > App Registration > New Application Registration).
* Next, give the application a name. In this example we are using “HelloID PowerShell” as application name.
* Specify who can use this application (Accounts in this organizational directory only).
* Specify the Redirect URI. You can enter any url as a redirect URI value. In this example we used http://localhost because it doesn't have to resolve.
* Click the “Register” button to finally create your new application.Some key items regarding the application are the Application ID (which is the Client ID), the Directory ID (which is the Tenant ID) and Client Secret.
### Configuring App Permissions
The [Microsoft Graph documentation](https://docs.microsoft.com/en-us/graph) provides details on which permission are required for each permission type.To assign your application the right permissions, navigate to Azure Portal > Azure Active Directory >App Registrations.
Select the application we created before, and select “API Permissions” or “View API Permissions”.
To assign a new permission to your application, click the “Add a permission” button.
From the “Request API Permissions” screen click “Microsoft Graph”.
For this connector the following permissions are used as Application permissions:
* Read and Write all user’s full profiles by using User.ReadWrite.All
* Read and Write all groups in an organization’s directory by using Group.ReadWrite.All
* Read and Write data to an organization’s directory by using Directory.ReadWrite.AllSome high-privilege permissions can be set to admin-restricted and require an administrators consent to be granted.
To grant admin consent to our application press the “Grant admin consent for TENANT” button.
### Authentication and Authorization
There are multiple ways to authenticate to the Graph API with each has its own pros and cons, in this example we are using the Authorization Code grant type.* First we need to get the Client ID, go to the Azure Portal > Azure Active Directory > App Registrations.
* Select your application and copy the Application (client) ID value.
* After we have the Client ID we also have to create a Client Secret.
* From the Azure Portal, go to Azure Active Directory > App Registrations.
* Select the application we have created before, and select "Certificates and Secrets".
* Under “Client Secrets” click on the “New Client Secret” button to create a new secret.
* Provide a logical name for your secret in the Description field, and select the expiration date for your secret.
* It's IMPORTANT to copy the newly generated client secret, because you cannot see the value anymore after you close the page.
* At least we need to get is the Tenant ID. This can be found in the Azure Portal by going to Azure Active Directory > Custom Domain Names, and then finding the .onmicrosoft.com domain.## All-in-one PowerShell setup script
The PowerShell script "createform.ps1" contains a complete PowerShell script using the HelloID API to create the complete Form including user defined variables, tasks and data sources._Please note that this script asumes none of the required resources do exists within HelloID. The script does not contain versioning or source control_
### Getting started
Please follow the documentation steps on [HelloID Docs](https://docs.helloid.com/hc/en-us/articles/360017556559-Service-automation-GitHub-resources) in order to setup and run the All-in one Powershell Script in your own environment.## Post-setup configuration
After the all-in-one PowerShell script has run and created all the required resources. The following items need to be configured according to your own environment
1. Update the following [user defined variables](https://docs.helloid.com/hc/en-us/articles/360014169933-How-to-Create-and-Manage-User-Defined-Variables)Variable nameExample valueDescription
AADtenantIDAzure AD Tenant IdId of the Azure tenant
AADAppIdAzure AD App IdId of the Azure app
AADAppSecretAzure AD App SecretSecreat of the Azure app## Manual resources
This Delegated Form uses the following resources in order to run### Static data source 'Azure-AD-User-Create-generate-table-employeeType'
### Powershell data source 'Azure-AD-User-Create-check-names'
### Delegated form task 'Azure AD Account - Create'
## Getting help
_If you need help, feel free to ask questions on our [forum](https://forum.helloid.com/forum/helloid-connectors/service-automation/192-helloid-sa-azure-ad-create-user)_## HelloID Docs
The official HelloID documentation can be found at: https://docs.helloid.com/