Skip to content

Commit

Permalink
New powershell connector (PSv2) (#2)
Browse files Browse the repository at this point in the history
* release new powershell connector

* Fix: minor fixes

* Fix: Script: Var

* Fix: Aref var

* Fix: Changes after testing

* Feat: fieldMapping and Readme

* Update README.md

* Fix: $outputContext now correct

* Fix: label description was incorrect

* Fix: Update Logo URL

* fix: updateOnupdate to onlyUpdateOnCorrelate

* Fix: NotFound varriable was incorrect

* Feat: added debug toggle
  • Loading branch information
rhouthuijzen authored Apr 25, 2024
1 parent 8bc2649 commit c9c4b31
Show file tree
Hide file tree
Showing 6 changed files with 460 additions and 646 deletions.
149 changes: 89 additions & 60 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,97 +1,126 @@
| :information_source: Information |
|:---------------------------|
| This repository contains the connector and configuration code only. The implementer is responsible to acquire the connection details such as username, password, certificate, etc. You might even need to sign a contract or agreement with the supplier before implementing this connector. Please contact the client's application manager to coordinate the connector requirements. |

| :warning: Warning |
|:---------------------------|
| The latest version of this connector requires **new api credentials**. To get these, please follow the [Visma documentation on how to register the App and grant access to client data](https://community.visma.com/t5/Kennisbank-Youforce-API/Visma-Developer-portal-een-account-aanmaken-applicatie/ta-p/527059).
<br />

# HelloID-Conn-Prov-Target-Raet-Beaufort-IAM-API-Identity

> [!IMPORTANT]
> This repository contains the connector and configuration code only. The implementer is responsible to acquire the connection details such as username, password, certificate, etc. You might even need to sign a contract or agreement with the supplier before implementing this connector. Please contact the client's application manager to coordinate the connector requirements.
<p align="center">
<img src="https://www.tools4ever.nl/connector-logos/vismaraet-logo.png" width="500">
<img src="https://github.com/Tools4everBV/HelloID-Conn-Prov-Target-Raet-Beaufort-IAM-API-Identity/blob/main/Logo.png?raw=true">
</p>

## Versioning
| Version | Description | Date |
| - | - | - |
| 1.1.2 | Performance and logging upgrades | 2022/10/25 |
| 1.1.1 | Updated checking of identity value | 2021/08/06 |
| 1.1.0 | Implementation updates | 2021/04/01 |
| 1.0.0 | Initial release | 2020/11/12 |

<!-- TABLE OF CONTENTS -->
## Table of Contents
- [Versioning](#versioning)
- [Table of Contents](#table-of-contents)
- [Introduction](#introduction)
- [Introduction](#introduction-1)
- [Getting started](#getting-started)
- [Connection settings](#connection-settings)
- [Prerequisites](#prerequisites)
## Table of contents

- [HelloID-Conn-Prov-Target-Raet-Beaufort-IAM-API-Identity](#helloid-conn-prov-target-raet-beaufort-iam-api-identity)
- [Table of contents](#table-of-contents)
- [Introduction](#introduction)
- [Getting started](#getting-started)
- [Provisioning PowerShell V2 connector](#provisioning-powershell-v2-connector)
- [Correlation configuration](#correlation-configuration)
- [Field mapping](#field-mapping)
- [Connection settings](#connection-settings)
- [Prerequisites](#prerequisites)
- [Remarks](#remarks)
- [Getting help](#getting-help)
- [HelloID docs](#helloid-docs)

- [Getting help](#getting-help)
- [HelloID docs](#helloid-docs)

## Introduction
By using this connector you will have the ability to update the 'identity' field of Raet users, using the RAET IAM API.

This connector is able to write back the identity of a provisioned user (to another target like Azure AD or MS AD) to the user of Raet Beaufort. This field can be used in Beaufort for single Sign-On purposes. Please keep in mind that for now, only the AccountCreate or AccountUpdate is triggering the possible change of the identity. (Disable, Delete and Enable are not neccesarry)
_HelloID-Conn-Prov-Target-Raet-Beaufort-IAM-API-Identity_ is a _target_ connector. _Raet-Beaufort_ provides a set of REST API's that allow you to programmatically interact with its data. The HelloID connector uses the API endpoints listed in the table below.

| Endpoint | Description |
| ------------------------------------------------- | ----------- |
| /iam/v1.0/users(employeeId={employeeId}) | GET user |
| /iam/v1.0/users(employeeId={employeeId})/identity | PATCH user |

This connector is able to write back the identity of a provisioned user (to another target like Azure AD or MS AD) to the user of Raet Beaufort. This field can be used in Beaufort for single Sign-On purposes.
Also keep in mind that this endpoint will be migrated to the new IAM-API later on.

More information about the Users endpoint of the Raet Users Endpoint can be found on:
- https://community.visma.com/t5/Kennisbank-Youforce-API/IAM-user-endpoint/ta-p/430073
- https://vr-api-integration.github.io/SwaggerUI/IAM%20Users.html
- [Community visma](https://community.visma.com/t5/Kennisbank-Youforce-API/IAM-user-endpoint/ta-p/430073)
- [Swagger](https://vr-api-integration.github.io/SwaggerUI/IAM%20Users.html)

## Introduction
By using this connector you will have the ability to update the 'identity' field of Raet users, using the RAET IAM API.

This connector is able to write back the identity of a provisioned user (to another target like Azure AD or MS AD) to the user of Raet Beaufort. This field can be used in Beaufort for single Sign-On purposes.
Also keep in mind that this endpoint will be migrated to the new IAM-API later on.

More information about the Users endpoint of the Raet Users Endpoint can be found on:
- https://community.visma.com/t5/Kennisbank-Youforce-API/IAM-user-endpoint/ta-p/430073
- https://vr-api-integration.github.io/SwaggerUI/IAM%20Users.html
-
The HelloID connector consists of the template scripts shown in the following table.
The following lifecycle actions are available:

| Action | Action(s) Performed | Comment |
| ------------------------------- | --------------------- | --------- |
| create.ps1 | Update RAET user | |
| update.ps1 | Update RAET user | |
| delete.ps1 | Update RAET user | Clear the unique fields, since the values have to be unique in RAET |
| Action | Description |
| ------------------ | ------------------------------------ |
| create.ps1 | Correlation on person |
| delete.ps1 | Empty configured field(s) on person |
| update.ps1 | Update configured field(s) on person |
| configuration.json | Default _configuration.json_ |
| fieldMapping.json | Default _fieldMapping.json_ |

## Getting started

### Provisioning PowerShell V2 connector

#### Correlation configuration

The correlation configuration is used to specify which properties will be used to match an existing account within _{connectorName}_ to a person in _HelloID_.

To properly setup the correlation:

1. Open the `Correlation` tab.

2. Specify the following configuration:

| Setting | Value |
| ------------------------- | --------------------------------- |
| Enable correlation | `True` |
| Person correlation field | `PersonContext.Person.ExternalId` |
| Account correlation field | `` |

> [!TIP]
> _For more information on correlation, please refer to our correlation [documentation](https://docs.helloid.com/en/provisioning/target-systems/powershell-v2-target-systems/correlation.html) pages_.
#### Field mapping

The field mapping can be imported by using the [_fieldMapping.json_](./fieldMapping.json) file.

### Connection settings

The following settings are required to connect to the API.

| Setting | Description | Example value |
| ----------------- | ------------------------------------------------------------- | ------------------------------------- |
| Client Id | The Client id for this Raet environment | A1bCdefghifjkL2MnOPQrsT3u45V6wx7Y |
| Client Secret | The Client secret for this Raet environment | 7aBcdeFgHijkLmN |
| Tenant Id | The Tenant id for this Raet environment | 1234567 |
| Setting | Description | Mandatory |
| -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- |
| Client ID | The Client ID to connect with the IAM API (created when registering the App in in the Visma Developer portal). | Yes |
| Client Secret | The Client Secret to connect with the IAM API (created when registering the App in in the Visma Developer portal). | Yes |
| Tenant ID | The Tenant ID to specify to which Raet tenant to connect with the IAM API (available in the Visma Developer portal after the invitation code has been accepted). | Yes |
| UpdateOnUpdate | If you also want to update the user on a update account | |

### Prerequisites

- [ ] HelloID Provisioning agent (cloud or on-prem).
> [!IMPORTANT]
> The latest version of this connector requires **new api credentials**. To get these, please follow the [Visma documentation](https://community.visma.com/t5/Kennisbank-Youforce-API/Visma-Developer-portal-een-account-aanmaken-applicatie/ta-p/527059) on how to register the App and grant access to client data.
- [ ] Enabling of the User endpoints.
- By default, the User endpoints aren't "enabled". This has to be requested at Raet.
- [ ] ClientID, ClientSecret and tenantID
- Since we are using the API we neet the ClientID, ClientSecret and tenantID to authenticate with RAET IAM-API Webservice.
- Since we are using the API we need the ClientID, ClientSecret and tenantID to authenticate with RAET IAM-API Webservice.
- [ ] Dependent account data in HelloID.
- Please make your provisioned system dependent on this Users Target Connector and make sure that the values needed to be written back are stored on the account data (e.g UserPrincipalName).

#### Remarks
- Only the 'identity' field can be updated, no other fields are (currently) supported.
> When the value in Raet equals the value in HelloID, the action will be skipped (no update will take place).
- Currently (08-12-2022) Changes you make with this connector through the API are not visible within the Youforce portal. If you want to check if the update is succesfull please retreive the edited user or try the SSO connection.
### Remarks
> [!TIP]
> Only the 'identity' field can be updated, no other fields are (currently) supported.
>
> When the value in Raet equals the value in HelloID, the action will be skipped (no update will take place).
> [!NOTE]
> Currently (08-12-2022) Changes you make with this connector through the API are not visible within the Youforce portal. If you want to check if the update is succesfull please retreive the edited user or try the SSO connection.

> [!NOTE]
> Currently (14-02-2024) it is not possible to empty the identity in Youforce. The endpoint will give a error. By default `ExternalID@Domain.com` will be filled.
## Getting help
> _For more information on how to configure a HelloID PowerShell connector, please refer to our [documentation](https://docs.helloid.com/hc/en-us/articles/360012558020-Configure-a-custom-PowerShell-target-system) pages_

> _If you need help, feel free to ask questions on our [forum](https://forum.helloid.com)_
> [!TIP]
> _For more information on how to configure a HelloID PowerShell connector, please refer to our [documentation](https://docs.helloid.com/en/provisioning/target-systems/powershell-v2-target-systems.html) pages_.
> [!TIP]
> _If you need help, feel free to ask questions on our [forum](https://forum.helloid.com)_.
## HelloID docs

The official HelloID documentation can be found at: https://docs.helloid.com/
6 changes: 3 additions & 3 deletions configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@
}
},
{
"key": "updateOnCorrelate",
"key": "onlyUpdateOnCorrelate",
"type": "checkbox",
"defaultValue": false,
"templateOptions": {
"label": "Update user when correlating and mapped data differs from data in RAET IAM API",
"label": "Only update on correlate",
"required": false,
"description": "This will update RAET IAM API users in the create action (not just correlate)."
"description": "When toggled, the Raet Beaufort user will only be updated when the account is correlated"
}
},
{
Expand Down
Loading

0 comments on commit c9c4b31

Please sign in to comment.