GetPersona operation
Find information about the GetPersona EWS operation.
The GetPersona operation returns a set of properties that are associated with a persona.
This operation was introduced in Exchange Server 2013.
Using the GetPersona operation
The GetPersona operation provides access to aggregated contact information in the form of a persona. The PersonaId element in the request identifies the persona to return in the response. The response can contain a default set of persona properties or a custom property set. We recommend that you specify a custom property set so that unused properties are not processed and sent from the server to the client.
GetPersona operation SOAP headers
The GetPersona operation can use the SOAP headers that are listed in the following table.
Header name | Element | Description |
---|---|---|
Impersonation |
ExchangeImpersonation |
Identifies the user whom the client application is impersonating. This header is applicable to a request. |
RequestVersion |
RequestServerVersion |
Identifies the schema version for the operation request. This header is applicable to a request. |
ServerVersion |
ServerVersionInfo |
Identifies the version of the server that responded to the request. This header is applicable to a response. |
GetPersona operation request example: Return a default set of properties for a persona
The following example of a GetPersona operation request shows how to return a default set of properties that are associated with a persona.
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<soap:Header>
<t:RequestServerVersion Version="Exchange2013"/>
</soap:Header>
<soap:Body xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">
<GetPersona>
<PersonaId Id="AAQkADEzAQAKtOtR/l4MlLqHWORfhSYKU="/>
</GetPersona>
</soap:Body>
</soap:Envelope>
The response SOAP body contains the following elements:
Successful GetPersona operation response
The following example shows a successful response to a GetPersona operation request.
Note
All item identifiers and change keys in this article have been shortened to preserve readability.
<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<h:ServerVersionInfo MajorVersion="15"
MinorVersion="0"
MajorBuildNumber="432"
MinorBuildNumber="5"
Version="Exchange2013"
xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types"
xmlns="http://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
</s:Header>
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<GetPersonaResponseMessage ResponseClass="Success"
xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">
<ResponseCode>NoError</ResponseCode>
<Persona>
<PersonaId Id="AAQkADEzAQAKtOtR="
xmlns="http://schemas.microsoft.com/exchange/services/2006/types"/>
<PersonaType xmlns="http://schemas.microsoft.com/exchange/services/2006/types">Person</PersonaType>
<CreationTime xmlns="http://schemas.microsoft.com/exchange/services/2006/types">2012-06-01T17:00:34Z</CreationTime>
<DisplayName xmlns="http://schemas.microsoft.com/exchange/services/2006/types">Brian Johnson</DisplayName>
<DisplayNameFirstLast xmlns="http://schemas.microsoft.com/exchange/services/2006/types">Brian Johnson</DisplayNameFirstLast>
<DisplayNameLastFirst xmlns="http://schemas.microsoft.com/exchange/services/2006/types">Johnson Brian</DisplayNameLastFirst>
<FileAs xmlns="http://schemas.microsoft.com/exchange/services/2006/types">Johnson, Brian</FileAs>
<FileAsId xmlns="http://schemas.microsoft.com/exchange/services/2006/types">None</FileAsId>
<GivenName xmlns="http://schemas.microsoft.com/exchange/services/2006/types">Brian</GivenName>
<Surname xmlns="http://schemas.microsoft.com/exchange/services/2006/types">Johnsoon</Surname>
<CompanyName xmlns="http://schemas.microsoft.com/exchange/services/2006/types">Contoso</CompanyName>
<RelevanceScore xmlns="http://schemas.microsoft.com/exchange/services/2006/types">4255550110</RelevanceScore>
<Attributions xmlns="http://schemas.microsoft.com/exchange/services/2006/types">
<Attribution>
<Id>0</Id>
<SourceId Id="AAMkA =" ChangeKey="EQAAABY+"/>
<DisplayName>Outlook</DisplayName>
<IsWritable>true</IsWritable>
<IsQuickContact>false</IsQuickContact>
<IsHidden>false</IsHidden>
<FolderId Id="AAMkA=" ChangeKey="AQAAAA=="/>
</Attribution>
</Attributions>
<DisplayNames xmlns="http://schemas.microsoft.com/exchange/services/2006/types">
<StringAttributedValue>
<Value>Brian Johnson</Value>
<Attributions>
<Attribution>0</Attribution>
</Attributions>
</StringAttributedValue>
</DisplayNames>
<FileAses xmlns="http://schemas.microsoft.com/exchange/services/2006/types">
<StringAttributedValue>
<Value>Johnson, Brian</Value>
<Attributions>
<Attribution>0</Attribution>
</Attributions>
</StringAttributedValue>
</FileAses>
<FileAsIds xmlns="http://schemas.microsoft.com/exchange/services/2006/types">
<StringAttributedValue>
<Value>None</Value>
<Attributions>
<Attribution>0</Attribution>
</Attributions>
</StringAttributedValue>
</FileAsIds>
<GivenNames xmlns="http://schemas.microsoft.com/exchange/services/2006/types">
<StringAttributedValue>
<Value>Brian</Value>
<Attributions>
<Attribution>0</Attribution>
</Attributions>
</StringAttributedValue>
</GivenNames>
<Surnames xmlns="http://schemas.microsoft.com/exchange/services/2006/types">
<StringAttributedValue>
<Value>Johnson</Value>
<Attributions>
<Attribution>0</Attribution>
</Attributions>
</StringAttributedValue>
</Surnames>
<MobilePhones xmlns="http://schemas.microsoft.com/exchange/services/2006/types">
<PhoneNumberAttributedValue>
<Value>
<Number>(425)555-0110</Number>
<Type>Mobile</Type>
</Value>
<Attributions>
<Attribution>0</Attribution>
</Attributions>
</PhoneNumberAttributedValue>
</MobilePhones>
<CompanyNames xmlns="http://schemas.microsoft.com/exchange/services/2006/types">
<StringAttributedValue>
<Value>Contoso</Value>
<Attributions>
<Attribution>0</Attribution>
</Attributions>
</StringAttributedValue>
</CompanyNames>
</Persona>
</GetPersonaResponseMessage>
</s:Body>
</s:Envelope>
The response SOAP body contains the following elements:
GetPersonaResponseMessage
SourceId SourceId
GetPersona operation error response
The following example shows an error response to a GetPersona operation request. This is a response to a request that contains an incorrectly specified persona identifier.
<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<h:ServerVersionInfo MajorVersion="15"
MinorVersion="0"
MajorBuildNumber="578"
MinorBuildNumber="11"
Version="Exchange2013"
xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types"
xmlns="http://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
</s:Header>
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<GetPersonaResponseMessage ResponseClass="Error"
xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">
<MessageText>Id is malformed.</MessageText>
<ResponseCode>ErrorInvalidIdMalformed</ResponseCode>
<DescriptiveLinkKey>0</DescriptiveLinkKey>
</GetPersonaResponseMessage>
</s:Body>
</s:Envelope>
The error response SOAP body contains the following elements:
For additional error codes that are generic to EWS and specific to this operation, see ResponseCode.