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.
{
"GetMbSec" :
{
"tMbSec" :
{
"id" : "S2!M"
},
"tArg" :
{
"pattern" :
{
"users" : "Get",
"user" :
{
"data" : "true",
"memberOf" : "Get"
}
}
}
}
}
{
"GetMbSecResult" :
{
"id" :
{
"id" : "S2!M"
},
"meta" :
{
"users" :
{
"its" :
{
"it" :
[
{
"k" : "2147483649",
"id" : "ADMIN",
"n" : "User",
"vis" : "1",
"type" : "User",
"sid" :
{
"sid" : "ACE44119CCF4F3EB315E1B1EF525736",
"type" : "User"
},
"data" :
{
"desc" : " ",
"memberOf" :
{
"its" :
{
"it" :
[
{
"k" : "2147483649",
"id" : "ADMINISTRATORS",
"n" : "Built-in group of administrators",
"vis" : "1",
"type" : "Group",
"sid" :
{
"sid" : "ACE44219CCF4F3EB315E1B1EF525736",
"type" : "Group"
}
}
]
}
},
"isNT" : "0",
"isExternal" : "0",
"isBuiltin" : "1",
"user" :
{
"mustChangePasswordAtNextLogon" : "0",
"cannotChangePassword" : "0",
"lockedState" : "NotLocked",
"manageDBGrants" : "1",
"maxLogonSessions" : "0",
"lastLoginStamp" : "2014-06-16T12:42:22.480",
"hasAccessToRepository" : "1",
"isAdmin" : "1",
"isIsa" : "0",
"isRoled" : "0"
}
}
},
{
"k" : "8954",
"id" : "PPUSER",
"n" : "PPUser",
"vis" : "1",
"type" : "User",
"sid" :
{
"sid" : "ACE44189549CCF4F3EB315E1B1EF525736",
"type" : "User"
},
"data" :
{
"memberOf" :
{
"its" :
{
"it" :
[
{
"k" : "2147483649",
"id" : "ADMINISTRATORS",
"n" : "Built-in group of administrators",
"vis" : "1",
"type" : "Group",
"sid" :
{
"sid" : "ACE44219CCF4F3EB315E1B1EF525736",
"type" : "Group"
}
}
]
}
},
"isNT" : "0",
"isExternal" : "0",
"isBuiltin" : "0",
"user" :
{
"mustChangePasswordAtNextLogon" : "0",
"cannotChangePassword" : "0",
"lockedState" : "NotLocked",
"manageDBGrants" : "1",
"maxLogonSessions" : "0",
"lastLoginStamp" : "2014-06-16T11:39:38.377",
"hasAccessToRepository" : "1",
"isAdmin" : "0",
"isIsa" : "0",
"isRoled" : "0"
}
}
}
]
}
}
}
}
}
The specified GetUserInfo function extracts information about repository 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 GetUserInfo(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 information on users
var result = somClient.GetMbSec(getMbSec);
return result;
}
See also:
SOAP