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 find out the correct syntax and the C# script now works.

    using VI.Projector.Connection;
    string dn;
    IQueryObject qo = SystemQuery.From("ADSAccount").Filter(String.Format("SAMAccountName='{0}'", value)).Select("XObjectKey");
    QueryObjectResult r = SystemObject.Connection.QueryObject(qo);
    dn = r.Result.First().GetValue("XObjectKey").AsString;
    $ObjectKeyManager$ = dn;

    I also find out that the problem is different from what I was thinking. I cannot update the ObjectKeyManager in ADSAccount. I'll open a new thread about it.

Reply
  • I find out the correct syntax and the C# script now works.

    using VI.Projector.Connection;
    string dn;
    IQueryObject qo = SystemQuery.From("ADSAccount").Filter(String.Format("SAMAccountName='{0}'", value)).Select("XObjectKey");
    QueryObjectResult r = SystemObject.Connection.QueryObject(qo);
    dn = r.Result.First().GetValue("XObjectKey").AsString;
    $ObjectKeyManager$ = dn;

    I also find out that the problem is different from what I was thinking. I cannot update the ObjectKeyManager in ADSAccount. I'll open a new thread about it.

Children
No Data