Skip to content

only the most used afas attributes are hardcoded in update script #22

Description

@yesenkaya

Currently not all the fields are handled by the code even if you tick in the update action.
We see that the most used attributes are hardcoded in the update script. It would work much better if we can make this dynamically so we don't have to edit the code.

All the available AFAS user attributes are in this link below
https://docs.afas.help/apidoc/en/Organisaties%20en%20personen#post-/connectors/KnUser

It would also usefull to add this link in the readme so we can add missing attributes when this list will be updated.

$updateAccountFields = @()
if ($account.PSObject.Properties.Name -Contains 'EmAd') {
$updateAccountFields += "EmAd"
}
if ($account.PSObject.Properties.Name -Contains 'Upn') {
$updateAccountFields += "Upn"
}
if (($account.PSObject.Properties.Name -Contains 'Site') -and ($actionContext.AccountCorrelated -eq $true)) {
$updateAccountFields += "Site"
}
if (($account.PSObject.Properties.Name -Contains 'InSi') -and ($actionContext.AccountCorrelated -eq $true)) {
$updateAccountFields += "InSi"
}
if (($actionContext.Configuration.updateUserId -eq $true) -and ($actionContext.AccountCorrelated -eq $true)) {
$updateAccountFields += "UsId"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions