Getting Information about Groups of Users

Below is the example of using the GetMbSec operation to get information about groups of users created in the repository security manager. The request contains the repository connection moniker. The response contains information about groups of 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.fsight.ru/PP.SOM.Som">
<tMbSec xmlns="">
  <id>S1!M</id>
  </tMbSec>
<tArg xmlns="">
<pattern>
  <groups>Get</groups>
<group>
  <data>true</data>
  <members>Get</members>
  </group>
  </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.fsight.ru/PP.SOM.Som" xmlns:q1="http://www.fsight.ru/PP.SOM.Som" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<id xmlns="">
  <id>S1!M</id>
  </id>
<meta xmlns="">
<groups>
<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>
<data>
  <desc>Built-in group of administrators</desc>
  <isNT>0</isNT>
  <isExternal>1</isExternal>
  <isBuiltin>1</isBuiltin>
<group>
<members>
<its>
<it>
  <k>2147483649</k>
  <id>ADMIN</id>
  <n>User</n>
  <vis>1</vis>
  <type>User</type>
<sid>
  <sid>PS-1-1</sid>
  <type>User</type>
  </sid>
  </it>
<it>
  <k>35005</k>
  <id>USER123456789</id>
  <vis>1</vis>
  <type>User</type>
<sid>
  <sid>PS-1-35005</sid>
  <type>User</type>
  </sid>
  </it>
<it>
  <k>2147483637</k>
  <id>PROGNOZ\GNRSPO</id>
  <n>PROGNOZ\GNRSPO</n>
  <vis>1</vis>
  <type>Group</type>
<sid>
  <sid>S-1-5-21-1287548229-1982989762-879972363-11463</sid>
  <type>Group</type>
  </sid>
  </it>
<it>
  <k>67467</k>
  <id>USER_ANN</id>
  <vis>1</vis>
  <type>User</type>
<sid>
  <sid>PS-1-67467</sid>
  <type>User</type>
  </sid>
  </it>
<it>
  <k>2147483646</k>
  <id>FS\IVANOV.IVAN</id>
  <n>Ivanov Ivan Ivanovich</n>
  <vis>1</vis>
  <type>User</type>
<sid>
  <sid>S-1-5-21-2210245889-1953428358-4221806923-1269</sid>
  <type>User</type>
  </sid>
  </it>
<it>
  <k>105163</k>
  <id>USER_1234</id>
  <vis>1</vis>
  <type>User</type>
<sid>
  <sid>PS-1-105163</sid>
  <type>User</type>
  </sid>
  </it>
<it>
  <k>197730</k>
  <id>NEWREPOADMIN</id>
  <n>NewRepoAdmin</n>
  <vis>1</vis>
  <type>User</type>
<sid>
  <sid>PS-1-197730</sid>
  <type>User</type>
  </sid>
  </it>
  </its>
  </members>
  <hasAccessToken>0</hasAccessToken>
  </group>
  </data>
  </it>
<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>
<data>
  <desc>Built-in group of users</desc>
  <isNT>0</isNT>
  <isExternal>1</isExternal>
  <isBuiltin>1</isBuiltin>
<group>
<members>
<its>
<it>
  <k>20798</k>
  <id>SIDOROV_IV</id>
  <vis>1</vis>
  <type>User</type>
<sid>
  <sid>PS-1-20798</sid>
  <type>User</type>
  </sid>
  </it>
  </its>
  </members>
  <hasAccessToken>0</hasAccessToken>
  </group>
  </data>
  </it>
<it>
  <k>2147483637</k>
  <id>PROGNOZ\GNRSPO</id>
  <n>PROGNOZ\GNRSPO</n>
  <vis>1</vis>
  <type>Group</type>
<sid>
  <sid>S-1-5-21-1287548229-1982989762-879972363-11463</sid>
  <type>Group</type>
  </sid>
<data>
  <desc>System Software Development Department</desc>
  <isNT>1</isNT>
  <isExternal>1</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>2020-03-23T09:07:03.000</changePassStamp>
  <autoRun />
  <temporaryAge>0</temporaryAge>
  <eternalPass>0</eternalPass>
  <certificate />
  </user>
<group>
<members>
  <its />
  </members>
  <hasAccessToken>0</hasAccessToken>
  </group>
  </data>
  </it>
<it>
  <k>8835</k>
  <id>PROGNOZ\TESTGROUP1</id>
  <n>PROGNOZ\TESTGROUP1</n>
  <vis>1</vis>
  <type>Group</type>
<sid>
  <sid>S-1-5-21-1287548229-1982989762-879972363-10952</sid>
  <type>Group</type>
  </sid>
<data>
  <isNT>1</isNT>
  <isExternal>1</isExternal>
  <isBuiltin>0</isBuiltin>
<group>
<members>
  <its />
  </members>
  <hasAccessToken>0</hasAccessToken>
  </group>
  </data>
  </it>
<it>
  <k>2147483615</k>
  <id>PROGNOZ\TESTGROUP2</id>
  <n>PROGNOZ\TESTGROUP2</n>
  <vis>1</vis>
  <type>Group</type>
<sid>
  <sid>S-1-5-21-1287548229-1982989762-879972363-10953</sid>
  <type>Group</type>
  </sid>
<data>
  <isNT>1</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>2020-03-23T09:07:03.000</changePassStamp>
  <autoRun />
  <temporaryAge>0</temporaryAge>
  <eternalPass>0</eternalPass>
  <certificate />
  </user>
<group>
<members>
  <its />
  </members>
  <hasAccessToken>0</hasAccessToken>
  </group>
  </data>
  </it>
<it>
  <k>2147483622</k>
  <id>FS\DOMAIN GUESTS</id>
  <n>FS\DOMAIN GUESTS</n>
  <vis>1</vis>
  <type>Group</type>
<sid>
  <sid>S-1-5-21-2210245889-1953428358-4221806923-514</sid>
  <type>Group</type>
  </sid>
<data>
  <desc>All domain guests</desc>
  <isNT>1</isNT>
  <isExternal>1</isExternal>
  <isBuiltin>0</isBuiltin>
<group>
<members>
  <its />
  </members>
  <hasAccessToken>0</hasAccessToken>
  </group>
  </data>
  </it>
<it>
  <k>144122</k>
  <id>BPM_ALL_USERS</id>
  <n>BPM_ALL_USERS</n>
  <vis>1</vis>
  <type>Group</type>
<sid>
  <sid>PS-1-144122</sid>
  <type>Group</type>
  </sid>
<data>
  <desc>Group including all users of business processes</desc>
  <isNT>0</isNT>
  <isExternal>1</isExternal>
  <isBuiltin>0</isBuiltin>
<group>
<members>
<its>
<it>
  <k>105163</k>
  <id>USER_1234</id>
  <vis>1</vis>
  <type>User</type>
<sid>
  <sid>PS-1-105163</sid>
  <type>User</type>
  </sid>
  </it>
  </its>
  </members>
  <hasAccessToken>0</hasAccessToken>
  </group>
  </data>
  </it>
  </its>
  </groups>
  <bisearchEnable>Full</bisearchEnable>
<apply>
<onCredentialsRequired>
<logonParams>
  <descr>Enter user name and password of the user who has permissions to create tables in the 'Database' database</descr>
  <realm>OBJ21909</realm>
  <toAdmin>1</toAdmin>
<logonData>
  <driver>MSSQL2012</driver>
  <server>v-nrspo-mssql.dev.fs.fsight.world</server>
  <database>Warehouse</database>
  </logonData>
  </logonParams>
  </onCredentialsRequired>
  </apply>
  </meta>
  </GetMbSecResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"GetMbSec" :
{
"tMbSec" :
{
"id" : "S1!M"
},
"tArg" :
{
"pattern" :
{
"groups" : "Get",
"group" :
{
"data" : "true",
"members" : "Get"
}
}
}
}
}

JSON response:

{
"GetMbSecResult" :
{
"id" :
{
"id" : "S1!M"
},
"meta" :
{
"groups" :
{
"its" :
{
"it" :
[
{
"k" : "2147483649",
"id" : "ADMINISTRATORS",
"n" : "ADMINISTRATORS",
"vis" : "1",
"type" : "Group",
"sid" :
{
"sid" : "PS-2-1",
"type" : "Group"
},
"data" :
{
"desc" : "Built-in administrator group",
"isNT" : "0",
"isExternal" : "1",
"isBuiltin" : "1",
"group" :
{
"members" :
{
"its" :
{
"it" :
[
{
"k" : "2147483649",
"id" : "ADMIN",
"n" : "User",
"vis" : "1",
"type" : "User",
"sid" :
{
"sid" : "PS-1-1",
"type" : "User"
}
},
{
"k" : "35005",
"id" : "USER123456789",
"vis" : "1",
"type" : "User",
"sid" :
{
"sid" : "PS-1-35005",
"type" : "User"
}
},
{
"k" : "2147483637",
"id" : "PROGNOZ\GNRSPO",
"n" : "PROGNOZ\GNRSPO",
"vis" : "1",
"type" : "Group",
"sid" :
{
"sid" : "S-1-5-21-1287548229-1982989762-879972363-11463",
"type" : "Group"
}
},
{
"k" : "67467",
"id" : "USER_ANN",
"vis" : "1",
"type" : "User",
"sid" :
{
"sid" : "PS-1-67467",
"type" : "User"
}
},
{
"k" : "2147483646",
"id" : "FS\IVANOV.IVAN",
"n" : "Ivanov Ivan Ivanovich",
"vis" : "1",
"type" : "User",
"sid" :
{
"sid" : "S-1-5-21-2210245889-1953428358-4221806923-1269",
"type" : "User"
}
},
{
"k" : "105163",
"id" : "USER_1234",
"vis" : "1",
"type" : "User",
"sid" :
{
"sid" : "PS-1-105163",
"type" : "User"
}
},
{
"k" : "197730",
"id" : "NEWREPOADMIN",
"n" : "NewRepoAdmin",
"vis" : "1",
"type" : "User",
"sid" :
{
"sid" : "PS-1-197730",
"type" : "User"
}
}
]
}
},
"hasAccessToken" : "0"
}
}
},
{
"k" : "2147483650",
"id" : "USERS",
"n" : "USERS",
"vis" : "1",
"type" : "Group",
"sid" :
{
"sid" : "PS-2-2",
"type" : "Group"
},
"data" :
{
"desc" : "Built-in group of users",
"isNT" : "0",
"isExternal" : "1",
"isBuiltin" : "1",
"group" :
{
"members" :
{
"its" :
{
"it" :
[
{
"k" : "20798",
"id" : "SIDOROV_IV",
"vis" : "1",
"type" : "User",
"sid" :
{
"sid" : "PS-1-20798",
"type" : "User"
}
}
]
}
},
"hasAccessToken" : "0"
}
}
},
{
"k" : "2147483637",
"id" : "PROGNOZ\GNRSPO",
"n" : "PROGNOZ\GNRSPO",
"vis" : "1",
"type" : "Group",
"sid" :
{
"sid" : "S-1-5-21-1287548229-1982989762-879972363-11463",
"type" : "Group"
},
"data" :
{
"desc" : "System Software Development Department",
"isNT" : "1",
"isExternal" : "1",
"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" : "2020-03-23T09:07:03.000",
"autoRun" : "",
"temporaryAge" : "0",
"eternalPass" : "0",
"certificate" : ""
},
"group" :
{
"members" :
{
"its" : ""
},
"hasAccessToken" : "0"
}
}
},
{
"k" : "8835",
"id" : "PROGNOZ\TESTGROUP1",
"n" : "PROGNOZ\TESTGROUP1",
"vis" : "1",
"type" : "Group",
"sid" :
{
"sid" : "S-1-5-21-1287548229-1982989762-879972363-10952",
"type" : "Group"
},
"data" :
{
"isNT" : "1",
"isExternal" : "1",
"isBuiltin" : "0",
"group" :
{
"members" :
{
"its" : ""
},
"hasAccessToken" : "0"
}
}
},
{
"k" : "2147483615",
"id" : "PROGNOZ\TESTGROUP2",
"n" : "PROGNOZ\TESTGROUP2",
"vis" : "1",
"type" : "Group",
"sid" :
{
"sid" : "S-1-5-21-1287548229-1982989762-879972363-10953",
"type" : "Group"
},
"data" :
{
"isNT" : "1",
"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" : "2020-03-23T09:07:03.000",
"autoRun" : "",
"temporaryAge" : "0",
"eternalPass" : "0",
"certificate" : ""
},
"group" :
{
"members" :
{
"its" : ""
},
"hasAccessToken" : "0"
}
}
},
{
"k" : "2147483622",
"id" : "FS\DOMAIN GUESTS",
"n" : "FS\DOMAIN GUESTS",
"vis" : "1",
"type" : "Group",
"sid" :
{
"sid" : "S-1-5-21-2210245889-1953428358-4221806923-514",
"type" : "Group"
},
"data" :
{
"desc" : "All domain guests",
"isNT" : "1",
"isExternal" : "1",
"isBuiltin" : "0",
"group" :
{
"members" :
{
"its" : ""
},
"hasAccessToken" : "0"
}
}
},
{
"k" : "144122",
"id" : "BPM_ALL_USERS",
"n" : "BPM_ALL_USERS",
"vis" : "1",
"type" : "Group",
"sid" :
{
"sid" : "PS-1-144122",
"type" : "Group"
},
"data" :
{
"desc" : "Group including all users of business processes",
"isNT" : "0",
"isExternal" : "1",
"isBuiltin" : "0",
"group" :
{
"members" :
{
"its" :
{
"it" :
[
{
"k" : "105163",
"id" : "USER_1234",
"vis" : "1",
"type" : "User",
"sid" :
{
"sid" : "PS-1-105163",
"type" : "User"
}
}
]
}
},
"hasAccessToken" : "0"
}
}
}
]
}
},
"bisearchEnable" : "Full",
"apply" :
{
"onCredentialsRequired" :
{
"logonParams" :
{
"descr" : "Enter user name and password of the user who has permissions to create tables in the 'Database' database",
"realm" : "OBJ21909",
"toAdmin" : "1",
"logonData" :
{
"driver" : "MSSQL2012",
"server" : "v-nrspo-mssql.dev.fs.fsight.world",
"database" : "Warehouse"
}
}
}
}
}
}
}
public static GetMbSecResult GetGroupInfo(string mb)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var getMbSec = new GetMbSec()
{
tArg = new GetMbSecArg()
{
pattern = new MbSecMdPattern()
{
groups = ListOperation.Get,
group = new MbSubjectPattern()
{
data = true,
members = ListOperation.Get
}
}
},
tMbSec = new MbId() { id = mb}
};
//Get information about groups of users
var result = somClient.GetMbSec(getMbSec);
return result;
}

See also:

GetMbSec: Operation