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.
{
"GetMbSec" :
{
"tMbSec" :
{
"id" : "S1!M"
},
"tArg" :
{
"pattern" :
{
"groups" : "Get",
"group" :
{
"data" : "true",
"members" : "Get"
}
}
}
}
}
{
"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\ALEKSANDR.SEDUNOV",
"n" : "Sedunov Aleksandr Mikhailovich",
"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" : "p7repository"
}
}
}
}
}
}
}
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: