Identity Broker Forum
Welcome to the community forum for Identity Broker.
Browse the knowledge base, ask questions directly to the product group, or leverage the community to get answers. Leave ideas for new features and vote for the features or bug fixes you want most.

PowerShell Transformation: Coalescing Multi-Value DNs
I have two dn.multi fields that I want to coalesce into a single list and also ensure it is unique. It would be something like this
$bothFields = $entity["placepositionoccupants"] + $entity["acpositionoccupants"]
$entity["occupants"] = $bothFields | select-object -unique
This doesn't work though. There's a couple things wrong with it. There's no addition operation for whatever object type the entity is and also when I do a select-object -unique it seems to longer be the type that Broker requires. Any hints on how I can achieve this is powershell? If I had the the object type that's required, I could create a new instance of that and then loop through the two lists adding as appropriate but I don't know the object type and couldn't find it any doco.

Thanks for the feedback Daniel. I've added it to our backlog for action.

Attribute Table Mapping Request
I have a customer that has modified their database schema and has had a flow on effect to IDB where it will not run as there is an extra column. Problem being the extra column has been added in multiple places and need to be able to isolate exactly which db/table/column each attribute connects to so I can inform the customer which instance of the extra column is causing IDB to fail so they can remove.

Hi Todd,
Out of the 5 tables listed in the ticket, i've done a mapping of which tables expect the field based on the OBSOLETE_1 field:
HBM_NAME: No
HBL_WORK_GROUP: No
HBM_PERSNL: Yes
HBM_ADDRESS: No
HBM_NAME_PEOPLE: Yes
So if they've added the field to HBM_NAME, HBM_WORK_GROUP or HBM_ADDRESS then it's likely one (or more) of these tables is what's causing the issue. The connector gets relational data from all of the tables listed, so it's unlikely to just be a single table.

Entity key contains null value

Can I get some assistance with what this error is inidcating? It says the entity key of the entity contains a null value. What is the entity key? I can find the user with the ID in MIM and there's a pending export that's failing where it's adding an attribute. There's no null or attribute deletion in MIM. The error in MIM isn't much help:


Hey Dan,
This means that an update to an entity from MIM is attempting to flow out to Broker, but a field marked as a "Key" in the adapter does not have a value.
Make sure any fields you've got defined as being the key have values assigned when flowing either adds or updates.

Feature Request: Logging from PowerShell Connector
The ability to write directly to the Identity Broker logs - such that any Broker log writer can be employed to pick this up apart from the default - is highly desirable.
Such a feature would avoid the need for the current practice of logging to custom log files using either custom code or various logging libraries.

Hi Bob,
This is already available. See this knowledge page for details:
https://voice.unifysolutions.net/knowledge-bases/7/articles/2917-powershell-connector-logger

Feature Request: Debug Capability for PowerShell Connector
Presently debugging a PowerShell connector script requires extensive use of logging.
While the above is still going to be necessary, the ability to attach a PowerShell ISE session to a PowerShell process to allow step-throughs and breakpoints is highly desirable.

# The following approach allows you to debug a PowerShell connector or adapter transform in IdB # See the following for background: # - https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/wait-debugger?view=powershell-6 # - https://stackoverflow.com/questions/42731150/how-to-pause-a-powershell-script-until-a-debugger-attaches # Prerequisite: PowerShell v5, IdB 5.*, PS connector or adapter transform # 1. Edit the PowerShell code and set a pause in your PowerShell code - long enough to intercept the process and enter debug mode: # you can use wait-debugger, but for now Matt showed me by using start-sleep instead #Wait-Debugger -Timeout 10 Start-Sleep 30 # 2. Find the process ID Get-Runspace # 3. Attach the ISE Enter-PSHostProcess -Name Unify.Service.Connect # 4. Debug the process Debug-Runspace -Id xx

SQL Connector Delta Import auto disable
The delta import functionality on the SQL connector requires a "Modified" column be present in the database, as a DateTime.
If the schema provider doesn't have this column, the "Poll Changes" operation on the connector should be disabled. Currently it just throws an error:


Not currently viable due to the design, backlogged improving the error message and documentation.

Chris21 full import not completing
Chris21 full import is getting partway through and then blocking - no errors thrown, just doesn't complete.
It's only processing 23,000 entities out of a total of 114,000.

SQL Connector Schema Provider not showing error
Noticed today that if you've got a database connector, and the account you're connecting with has access to the database but no roles assigned (db_reader etc) then a request schema will not show an error - it will instead show that there are no schema fields.
Test agent completes without issue.
The only way to show the error (no SELECT permission), you have to manually add a schema field and attempt an import.
The schema provider should display this same error when attempting to get the schema.

Duplicate Error on DN in PowerShell script
I have a PowerShell connector that is pulling two attributes, DN and another one. DN is the key and it's throwing errors saying "An item with the same key has already been added". This isn't possible because DN is unique. Here is the Import All script:
import-module ActiveDirectory
$server = "Dcbr2wdc1"
$searchBase = "ou=Users,ou=dams,dc=internaldmz-dev,dc=local"
$users = get-aduser -Server $server -SearchBase $searchBase -Properties DistinguishedName, msDS-UserPasswordExpiryTimeComputed -Filter {PasswordNeverExpires -eq $false}
foreach($user in $users)
{
$entity=$entities.Create()
$entity["ADDN"] = $user.DistinguishedName
$entity["ComputedPasswordExpiry"] = $user.'msDS-UserPasswordExpiryTimeComputed'
$entity.Commit()
}
and here is the schema
New-Field 'ADDN' 'string' $true $false $true;
New-Field 'ComputedPasswordExpiry' 'string' $false $false $false;
# name type key read-only required
I tried writing the DNs to a file in the script and just got a list of DNs, no obvious duplicate. Attached the log and connector config.

More context in error messages
Can we get more information in error messages. An example is today, in a connector, I'm getting the error:
"An error has occurred: An item with the same key has already been added."
This is all the information I'm getting and though it tells me what the error is it doesn't give me any information that helps me resolve it. What would be useful is if it provided the key that it's faulting on.
Customer support service by UserEcho