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",
"n" : "User",
"vis" : "1",
"type" : "User",
"sid" :
{
"sid" : "PS-1-1",
"type" : "User"
}
},
"emails" :
{
"its" :
{
"it" :
[
{
"name" : "Work",
"email" : ""
},
{
"name" : "Mobile",
"email" : ""
},
{
"name" : "Personal",
"email" : ""
},
{
"name" : "324",
"email" : "123@mail.ru"
}
]
}
},
"props" :
{
"its" : ""
}
}
]
}
},
"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" : "Warehouse"
}
}
}
}
}
}
}
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: