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",
"vis" : "1",
"type" : "User",
"sid" :
{
"sid" : "PS-1-1",
"type" : "User"
}
},
{
"k" : "545",
"id" : "NEWADMIN",
"n" : "NewAdmin",
"vis" : "1",
"type" : "User",
"sid" :
{
"sid" : "PS-1-545",
"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" : "532",
"id" : "GUEST",
"n" : "GUEST",
"vis" : "1",
"type" : "User",
"sid" :
{
"sid" : "PS-1-532",
"type" : "User"
}
}
]
}
},
"hasAccessToken" : "0"
}
}
}
]
}
},
"bisearchEnable" : "Disable"
}
}
}
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: