Highlighted
Flexera beginner

AD Custom Import

I’m creating an custom LDAP business adapter for importing various active directory user attributes. I’m struggling with the following items:

  1. How can I convert a retrieved value to lower case?
  2. How can I link the retrieved Manager (which is a distinguished name in AD) to an existing user in the FlexNet Manager database?
  3. How can I use a “switch” or “select case” on a retrieved value in order to write a “fixed" value in the database?

    Example
    employeeType in Active Directory which can contain user or cuser. I want to use this value to update the Employment status field.

    user => Employee
    cuser => Consultant
    Any other value = blank

  4. How can I set the Status to Active or Inactive based on the bits set in the userAccountControl attribute?

Thnx!

0 Kudos
6 Replies
Highlighted
Frequent contributor

Re: AD Custom Import

Hi @mremkes 

The short answer is you need to do this in two steps:

1. Stage your data and normalise it

2. Import to FNMS via a business adapter

To answer your specific questions:

1.   Assuming you are staging data in SQL, there are a number of links on google for changing sentence case in a field.  This one is simple:

UPDATE titles
  SET title =      UPPER(LEFT(title, 1)) +        LOWER(RIGHT(title, LEN(title) - 1))

 

2. Refer to the user.xml DDI.  You will see that you can first pass teh manager name to the system to get a manageroutid which you then use to update the users manager value.

3. You can stage the data in an sql table, normalise it.  Or you can write a case statement in your SQL that you select the data out in.

4.  Assuming you are referring to employment status - current vs ex employee - then the userstatus field can be done as with 3 above.

Regards

 

Highlighted
Community Manager Community Manager
Community Manager

Re: AD Custom Import

Attached is a sample adapter that works with FlexNet Manager Suite On-premises (not Cloud) to import user data from Active Directory. This adapter illustrates handling of some similar (but a little different) scenarios as discussed in this thread:

  • Using a CASE (switch) statement to map source values to different target values - see the handling of the Employment Status property.
  • Linking users to their managers, identified by the managers' distinguished name - see the Update User Managers custom query.

Hopefully these examples give inspiration on how to go about handling the particular properties you are working with.

If you are working with FlexNet Cloud then you would need to stage and transform data locally as @Nico_Erasmus has suggested before your business adapter runs to achieve similar outcomes.

(Anything expressed here is my own view and not necessarily that of my employer, Flexera. If my reply answers a question you have raised, please click "ACCEPT AS SOLUTION".)
0 Kudos
Highlighted
Flexera beginner

Re: AD Custom Import

Hi @Nico_Erasmus 

Thank you for your answer. I was hoping I could resolve this without using the staging database. As we are using the FlexNet Manager Suite On-premises I’m first going to investigate the solution provided by @ChrisG before diving into staging databases.

0 Kudos
Highlighted
Flexera beginner

Re: AD Custom Import

Hi @ChrisG ,

I'm trying to implement the solution you provided. As soon as I use the ValueType = "SQL" in the xml file, the excution of the adapter will fail with:

'SQLValue attribute found in DDI file C:\ProgramData\Flexera Software\Beacon\IntermediateData\BI_Import AD Users\ddi.xml.'

Also when I try to use the 'Use Physical table' option, the execution of the adapter will fail with:

'UsePhysicalTable attribute found in DDI file C:\ProgramData\Flexera Software\Beacon\IntermediateData\BI_Import AD Users\ddi.xml.'

Apparently I'm missing something here...

0 Kudos