This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Identity Manager - C# Mapping Script Documentation

I need to port the following VB script to C# because I can't change connector scripting language anymore.

I can't find any documentation about that. Any help? Thanks

Imports VI.Projector.Connection
Dim dn AS String
dn = SystemObject.Connection.QueryObject(SystemQuery _
 .From("ADSAccount") _
 .Select("DistinguishedName") _
 .Filter(String.Format("SAMAccountName='{0}'", $VRT_Manager$))) _
 .Result.First.GetValue("DistinguishedName").AsString
return dn

Parents
  • I tried with the code

    string dn;
    dn = SystemObject.Connection.QueryObject(SystemQuery.From("ADSAccount").Select("XObjectKey").Filter(string.Format("SAMAccountName='{0}'", value))).Result.First.GetValue("XObjectKey").AsString;
    

    But the compilation still fails.

    [1777156] The following errors occured while compiling:
    
    CS0103: The name 'SystemQuery' does not exist in the current context
    Position: Set-Script of ScriptEditor (VRT_Manager)
    Line: 2 Column: 42
    

    I can't find any working C# example in the documentation and I can't do anything in visual studio because I don't know what this is  around that script.

    I need to find XObjectKey using SAMAccountName to set ObjectKeyManager in ADSAccount.

    Resolve key is not working so I tried a script to find out a solution.

Reply
  • I tried with the code

    string dn;
    dn = SystemObject.Connection.QueryObject(SystemQuery.From("ADSAccount").Select("XObjectKey").Filter(string.Format("SAMAccountName='{0}'", value))).Result.First.GetValue("XObjectKey").AsString;
    

    But the compilation still fails.

    [1777156] The following errors occured while compiling:
    
    CS0103: The name 'SystemQuery' does not exist in the current context
    Position: Set-Script of ScriptEditor (VRT_Manager)
    Line: 2 Column: 42
    

    I can't find any working C# example in the documentation and I can't do anything in visual studio because I don't know what this is  around that script.

    I need to find XObjectKey using SAMAccountName to set ObjectKeyManager in ADSAccount.

    Resolve key is not working so I tried a script to find out a solution.

Children
No Data