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" : "S2!M"
},
"tArg" :
{
"pattern" :
{
"groups" : "Get",
"group" :
{
"data" : "true",
"members" : "Get"
}
}
}
}
}
{
"GetMbSecResult" :
{
"id" :
{
"id" : "S2!M"
},
"meta" :
{
"groups" :
{
"its" :
{
"it" :
[
{
"k" : "2147483649",
"id" : "ADMINISTRATORS",
"n" : "Built-in group of administrators",
"vis" : "1",
"type" : "Group",
"sid" :
{
"sid" : "ACE44219CCF4F3EB315E1B1EF525736",
"type" : "Group"
},
"data" :
{
"desc" : "Built-in group of administrators",
"isNT" : "0",
"isExternal" : "1",
"isBuiltin" : "1",
"group" :
{
"members" :
{
"its" :
{
"it" :
[
{
"k" : "2147483649",
"id" : "ADMIN",
"n" : "User",
"vis" : "1",
"type" : "User",
"sid" :
{
"sid" : "ACE44119CCF4F3EB315E1B1EF525736",
"type" : "User"
}
},
{
"k" : "8954",
"id" : "PPUSER",
"n" : "PPUser",
"vis" : "1",
"type" : "User",
"sid" :
{
"sid" : "ACE44189549CCF4F3EB315E1B1EF525736",
"type" : "User"
}
}
]
}
}
}
}
},
{
"k" : "2147483650",
"id" : "USERS",
"n" : "Built-in group of users",
"vis" : "1",
"type" : "Group",
"sid" :
{
"sid" : "ACE44229CCF4F3EB315E1B1EF525736",
"type" : "Group"
},
"data" :
{
"desc" : "Built-in group of users",
"isNT" : "0",
"isExternal" : "1",
"isBuiltin" : "1",
"group" :
{
"members" :
{
"its" : ""
}
}
}
},
{
"k" : "8835",
"id" : "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" : ""
}
}
}
}
]
}
}
}
}
},
The specified GetGroupInfo function extracts information about repository groups of users. The repository connection moniker is sent as an input parameter. The result of the function is the result of the operation.
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 on groups of users
var result = somClient.GetMbSec(getMbSec);
return result;
}
See also:
SOAP