Below is the example of using the GetMbSec operation to get information about the current user profile. The request contains the repository connection moniker. The response contains information about email addresses and additional properties of user saved in the profile.
{
"GetMbSec" :
{
"tMbSec" :
{
"id" : "S1!M"
},
"tArg" :
{
"pattern" :
{
"profiles" : "Get",
"profilesFilter" :
{
"current" : "true"
},
"profile" :
{
"subject" : "true",
"data" : "true"
}
}
}
}
}
{
"GetMbSecResult" :
{
"id" :
{
"id" : "S1!M"
},
"meta" :
{
"profiles" :
{
"its" :
{
"it" :
[
{
"k" : "0",
"id" : "PS-1-1",
"n" : "ADMIN",
"vis" : "1",
"sid" :
{
"sid" : "PS-1-1"
},
"subject" :
{
"k" : "2147483649",
"id" : "ADMIN",
"vis" : "1",
"type" : "User",
"sid" :
{
"sid" : "PS-1-1",
"type" : "User"
}
},
"emails" :
{
"its" :
{
"it" :
[
{
"name" : "Work",
"email" : "NewWork@example.ru"
},
{
"name" : "Mobile",
"email" : "NewMobile@example.ru"
},
{
"name" : "Personal",
"email" : "NewHome@example.ru"
}
]
},
"def" :
{
"name" : "Work",
"email" : "NewWork@example.ru"
},
"work" :
{
"name" : "Work",
"email" : "NewWork@example.ru"
},
"personal" :
{
"name" : "Personal",
"email" : "NewHome@example.ru"
},
"mobile" :
{
"name" : "Mobile",
"email" : "NewMobile@example.ru"
}
},
"props" :
{
"its" :
{
"it" :
[
{
"k" : "1",
"id" : "Location",
"value" : "Home",
"dt" : "1"
}
]
}
}
}
]
}
},
"bisearchEnable" : "Disable"
}
}
}
public static GetMbSecResult GetUserProfiles(string mb)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var getMbSec = new GetMbSec()
{
tArg = new GetMbSecArg()
{
pattern = new MbSecMdPattern()
{
//Parameters for getting user profile information
profiles = ListOperation.Get,
profile = new MbSecProfilePattern()
{
subject = true
},
profilesFilter = new MbSecProfilesFilter()
{
current = true
}
}
},
tMbSec = new MbId() { id = mb }
};
//Get information on user profiles
var result = somClient.GetMbSec(getMbSec);
return result;
}
See also: