Connecting to Repository Using Integrated Domain Authentication

Below is the example of using the OpenMetabase operation to connect to a repository using the current domain user. The request contains only identifier of the description that contains settings for the repository connection. The response contains the repository connection moniker.

SOAP request:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<OpenMetabase xmlns="http://www.fsight.ru/PP.SOM.Som">
<tDef xmlns="">
  <id>WAREHOUSE_DOMAIN</id>
  </tDef>
<tCreds xmlns="">
  <pass />
  </tCreds>
  <tArg xmlns="" />
  </OpenMetabase>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<OpenMetabaseResult xmlns="http://www.fsight.ru/PP.SOM.Som" xmlns:q1="http://www.fsight.ru/PP.SOM.Som" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <id xmlns="">JINPKNBLFFHGGOAEMPGHKFFGDJMMFMGEIKMPMPCCPADDPPHJ!M</id>
  <sessKey xmlns="">150248</sessKey>
  <sessCookie xmlns="">C2</sessCookie>
  <version xmlns="">166</version>
  <defLocale xmlns="">1049</defLocale>
  <driver xmlns="">2</driver>
  </OpenMetabaseResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"OpenMetabase" :
{
"tDef" :
{
"id" : "WAREHOUSE_DOMAIN"
},
"tCreds" :
{
"pass" : ""
},
"tArg" : ""
}
}

JSON response:

{
"OpenMetabaseResult" :
{
"id" : "JINPKNBLFFHGGOAEMPGHKFFGDJMMFMGEIKMPMPCCPADDPPHJ!M",
"sessKey" : "150248",
"sessCookie" : "C2",
"version" : "166",
"defLocale" : "1049",
"driver" : "2"
}
}
public static MbId IntegratedDomainConnect(string mbDefinitionId)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tOpen = new OpenMetabase()
{
tArg = new OpenMetabaseArg() { },
// Empty credentials, instead of which domain user credentials will be sent
tCreds = new UserCreds() { pass = "" },
tDef = new MbDef() // Description of repository, to which connection is established
{
id = mbDefinitionId
}
};
// Repository connection
MbId mb = somClient.OpenMetabase(tOpen);
return mb;
}

See also:

OpenMetabase