Courion Tip – avoiding creating accounts that already exist

I haven’t figured it out yet…. I think its working, but needs more testing

Let me give you an example. Let’s assume the data in the identitymap is good.

If the identitymap looks like this:

888944     danmurphy    Profile

888944     danmurphy    ActiveDirectory

There is no point in a Courion process trying to create an Active

Directory account for me,

So, I would assume that I could do an AuthStep2, point it to

IdentityMap, and do something like “where %Target% and

%ProvisioneeCommunity.User% NOT in IdentityMap”  – yea, not valid

code, but let’s go with it for now.  Assuming, of course, that

Target=ActiveDirectory and Provisionee Community User = danmurphy

(being passed via XMLAO), then it should look in the identitymap, see

the entries, and NOT attempt to create the account.

Of course, if the identitymap looks like this:

888944     danmurphy    Profile

then it should go ahead and create the account in active directory.

IF Exists (select * from IDENTITYMAP where PROFILEUID = %Provisionee Community.User% and TARGETID like %TargetId%) Select ‘True’ as result

Else Select ‘False’ as result

Not sure if I should do this in Auth Step 2, or as a Condition….

If I set it as a condition, I could ‘flip’ it, so that it returns true when the entry isn’t in the identitymap – as in, ‘ok, go ahead and create the account’

IF EXISTS (select Profileuid from IDENTITYMAP where PROFILEUID = ‘%Custom Macro.[SQL].GetPS.Provisionee.EmployeeID%’ and TARGETID like ‘%TargetId%’) select ‘True’ as dummyvariable

else select ‘False’ as dummyvariable

Auth Step 2 set to identitymap

Limit Authentication Criteria:

True = %Custom Macro.IDM_Entry_NOT_Exists%

Custom Macro

ADO Connector

Profile

Name

IDM_Entry_NOT_Exists

Native Query String:

IF EXISTS (select Profileuid from IDENTITYMAP where PROFILEUID = ‘%Custom Macro.[SQL].GetPS.Provisionee.EmployeeID%’ and TARGETID like ‘%Custom Macro.[VBS].SPML.TargetID%’) select ‘False’ as dummyvariable

else select ‘True’ as dummyvariable

Advertisements

Posted June 29, 2011 by mmdmurphy in Courion Tip

%d bloggers like this: