Getting Information about Users

Below is the example of using the GetMbSec operation to get information about users created in the repository security manager. The request contains the repository connection moniker. The response contains information about users.

SOAP request:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<GetMbSec xmlns="http://www.prognoz.ru/PP.SOM.Som">
<tMbSec xmlns=" ">
  <id>S1!M</id>
  </tMbSec>
<tArg xmlns=" ">
<pattern>
  <users>Get</users>
<user>
  <data>true</data>
  <memberOf>Get</memberOf>
  </user>
  </pattern>
  </tArg>
  </GetMbSec>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<GetMbSecResult xmlns="http://www.prognoz.ru/PP.SOM.Som" xmlns:q1="http://www.prognoz.ru/PP.SOM.Som" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<id xmlns=" ">
  <id>S1!M</id>
  </id>
<meta xmlns=" ">
<users>
<its>
<it>
  <k>2147483649</k>
  <id>ADMIN</id>
  <vis>1</vis>
  <type>User</type>
<sid>
  <sid>PS-1-1</sid>
  <type>User</type>
  </sid>
<data>
  <desc />
<memberOf>
<its>
<it>
  <k>2147483649</k>
  <id>ADMINISTRATORS</id>
  <n>ADMINISTRATORS</n>
  <vis>1</vis>
  <type>Group</type>
<sid>
  <sid>PS-2-1</sid>
  <type>Group</type>
  </sid>
  </it>
  </its>
  </memberOf>
  <isNT>0</isNT>
  <isExternal>0</isExternal>
  <isBuiltin>1</isBuiltin>
<user>
  <mustChangePasswordAtNextLogon>0</mustChangePasswordAtNextLogon>
  <cannotChangePassword>0</cannotChangePassword>
  <lockedState>NotLocked</lockedState>
  <manageDBGrants>1</manageDBGrants>
  <maxLogonSessions>0</maxLogonSessions>
  <lastLoginStamp>2018-10-24T11:31:20.847</lastLoginStamp>
  <hasAccessToRepository>1</hasAccessToRepository>
  <isAdmin>1</isAdmin>
  <isIsa>0</isIsa>
  <isRoled>0</isRoled>
  <changePassStamp>2018-10-24T06:31:31.000</changePassStamp>
  <autoRun />
  <temporaryAge>0</temporaryAge>
  <eternalPass>0</eternalPass>
  <certificate />
  </user>
  </data>
  </it>
<it>
  <k>532</k>
  <id>GUEST</id>
  <n>GUEST</n>
  <vis>1</vis>
  <type>User</type>
<sid>
  <sid>PS-1-532</sid>
  <type>User</type>
  </sid>
<data>
<memberOf>
<its>
<it>
  <k>2147483650</k>
  <id>USERS</id>
  <n>USERS</n>
  <vis>1</vis>
  <type>Group</type>
<sid>
  <sid>PS-2-2</sid>
  <type>Group</type>
  </sid>
  </it>
  </its>
  </memberOf>
  <isNT>0</isNT>
  <isExternal>0</isExternal>
  <isBuiltin>0</isBuiltin>
<user>
  <mustChangePasswordAtNextLogon>0</mustChangePasswordAtNextLogon>
  <cannotChangePassword>0</cannotChangePassword>
  <lockedState>NotLocked</lockedState>
  <manageDBGrants>1</manageDBGrants>
  <maxLogonSessions>0</maxLogonSessions>
  <lastLoginStamp>1899-12-30T00:00:00.000</lastLoginStamp>
  <hasAccessToRepository>1</hasAccessToRepository>
  <isAdmin>0</isAdmin>
  <isIsa>0</isIsa>
  <isRoled>0</isRoled>
  <changePassStamp>2018-10-22T10:30:33.000</changePassStamp>
  <autoRun />
  <temporaryAge>0</temporaryAge>
  <eternalPass>0</eternalPass>
  <certificate />
  </user>
  </data>
  </it>
<it>
  <k>545</k>
  <id>NEWADMIN</id>
  <n>NewAdmin</n>
  <vis>1</vis>
  <type>User</type>
<sid>
  <sid>PS-1-545</sid>
  <type>User</type>
  </sid>
<data>
<memberOf>
<its>
<it>
  <k>2147483649</k>
  <id>ADMINISTRATORS</id>
  <n>ADMINISTRATORS</n>
  <vis>1</vis>
  <type>Group</type>
<sid>
  <sid>PS-2-1</sid>
  <type>Group</type>
  </sid>
  </it>
  </its>
  </memberOf>
  <isNT>0</isNT>
  <isExternal>0</isExternal>
  <isBuiltin>0</isBuiltin>
<user>
  <mustChangePasswordAtNextLogon>0</mustChangePasswordAtNextLogon>
  <cannotChangePassword>0</cannotChangePassword>
  <lockedState>NotLocked</lockedState>
  <manageDBGrants>1</manageDBGrants>
  <maxLogonSessions>0</maxLogonSessions>
  <lastLoginStamp>1899-12-30T00:00:00.000</lastLoginStamp>
  <hasAccessToRepository>1</hasAccessToRepository>
  <isAdmin>0</isAdmin>
  <isIsa>0</isIsa>
  <isRoled>0</isRoled>
  <changePassStamp>2018-10-24T06:31:30.000</changePassStamp>
  <autoRun />
  <temporaryAge>0</temporaryAge>
  <eternalPass>0</eternalPass>
  <certificate />
  </user>
  </data>
  </it>
  </its>
  </users>
  <bisearchEnable>Disable</bisearchEnable>
  </meta>
  </GetMbSecResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"GetMbSec" :
{
"tMbSec" :
{
"id" : "S1!M"
},
"tArg" :
{
"pattern" :
{
"users" : "Get",
"user" :
{
"data" : "true",
"memberOf" : "Get"
}
}
}
}
}

JSON response:

{
"GetMbSecResult" :
{
"id" :
{
"id" : "S1!M"
},
"meta" :
{
"users" :
{
"its" :
{
"it" :
[
{
"k" : "2147483649",
"id" : "ADMIN",
"vis" : "1",
"type" : "User",
"sid" :
{
"sid" : "PS-1-1",
"type" : "User"
},
"data" :
{
"desc" : " ",
"memberOf" :
{
"its" :
{
"it" :
[
{
"k" : "2147483649",
"id" : "ADMINISTRATORS",
"n" : "ADMINISTRATORS",
"vis" : "1",
"type" : "Group",
"sid" :
{
"sid" : "PS-2-1",
"type" : "Group"
}
}
]
}
},
"isNT" : "0",
"isExternal" : "0",
"isBuiltin" : "1",
"user" :
{
"mustChangePasswordAtNextLogon" : "0",
"cannotChangePassword" : "0",
"lockedState" : "NotLocked",
"manageDBGrants" : "1",
"maxLogonSessions" : "0",
"lastLoginStamp" : "2018-10-24T11:31:20.847",
"hasAccessToRepository" : "1",
"isAdmin" : "1",
"isIsa" : "0",
"isRoled" : "0",
"changePassStamp" : "2018-10-24T06:31:31.000",
"autoRun" : "",
"temporaryAge" : "0",
"eternalPass" : "0",
"certificate" : ""
}
}
},
{
"k" : "532",
"id" : "GUEST",
"n" : "GUEST",
"vis" : "1",
"type" : "User",
"sid" :
{
"sid" : "PS-1-532",
"type" : "User"
},
"data" :
{
"memberOf" :
{
"its" :
{
"it" :
[
{
"k" : "2147483650",
"id" : "USERS",
"n" : "USERS",
"vis" : "1",
"type" : "Group",
"sid" :
{
"sid" : "PS-2-2",
"type" : "Group"
}
}
]
}
},
"isNT" : "0",
"isExternal" : "0",
"isBuiltin" : "0",
"user" :
{
"mustChangePasswordAtNextLogon" : "0",
"cannotChangePassword" : "0",
"lockedState" : "NotLocked",
"manageDBGrants" : "1",
"maxLogonSessions" : "0",
"lastLoginStamp" : "1899-12-30T00:00:00.000",
"hasAccessToRepository" : "1",
"isAdmin" : "0",
"isIsa" : "0",
"isRoled" : "0",
"changePassStamp" : "2018-10-22T10:30:33.000",
"autoRun" : "",
"temporaryAge" : "0",
"eternalPass" : "0",
"certificate" : ""
}
}
},
{
"k" : "545",
"id" : "NEWADMIN",
"n" : "NewAdmin",
"vis" : "1",
"type" : "User",
"sid" :
{
"sid" : "PS-1-545",
"type" : "User"
},
"data" :
{
"memberOf" :
{
"its" :
{
"it" :
[
{
"k" : "2147483649",
"id" : "ADMINISTRATORS",
"n" : "ADMINISTRATORS",
"vis" : "1",
"type" : "Group",
"sid" :
{
"sid" : "PS-2-1",
"type" : "Group"
}
}
]
}
},
"isNT" : "0",
"isExternal" : "0",
"isBuiltin" : "0",
"user" :
{
"mustChangePasswordAtNextLogon" : "0",
"cannotChangePassword" : "0",
"lockedState" : "NotLocked",
"manageDBGrants" : "1",
"maxLogonSessions" : "0",
"lastLoginStamp" : "1899-12-30T00:00:00.000",
"hasAccessToRepository" : "1",
"isAdmin" : "0",
"isIsa" : "0",
"isRoled" : "0",
"changePassStamp" : "2018-10-24T06:31:30.000",
"autoRun" : "",
"temporaryAge" : "0",
"eternalPass" : "0",
"certificate" : ""
}
}
}
]
}
},
"bisearchEnable" : "Disable"
}
}
}
public static GetMbSecResult GetUsersInfo(string mb)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var getMbSec = new GetMbSec()
{
tArg = new GetMbSecArg()
{
pattern = new MbSecMdPattern()
{
users = ListOperation.Get,
user = new MbSubjectPattern()
{
data = true,
memberOf = ListOperation.Get
}
}
},
tMbSec = new MbId() { id = mb }
};
//Get user information
var result = somClient.GetMbSec(getMbSec);
return result;
}

See also:

GetMbSec: Operation