# Table of contents:

# Introduction

FindMembership is one of the SOAP actions the Contact Sharing Service provides.

Returns the full list of members in the Allow List (AL), Block List (BL), Reverse List (RL) and Pending List (PL). For retrieving information about the Forward List (FL), read the ABFindAll article.

# Client/Request

The template used in this action is described on the Address Book Service main page.

# FindMembership

This element has only one attribute:

# serviceFilter

This element only contains the <Types> element.

# Types

This element contains one or multiple <ServiceType> elements.

# ServiceType

Can be any of the following:

# View

Always set to Full.

# deltasOnly

If set to true, the <lastChange> value is compared against the server to only provide the updates since the timestamp provided.

# lastChange

This is a ISO 8601 timestamp which denotes the last time you retrieved the memberships, comes from the response's <LastChange> element inside the <OwnerNamespace> element.

# Server/Response

The template used in this action is described on the Address Book Service main page.

# FindMembershipResponse

This element only contains the <FindMembershipResult> element.

# FindMembershipResult

This element only contains both the <Services> and the <OwnerNamespace> element.

# Services

This element only contains one or multiple <Service> elements.

# Service

This element only contains one or multiple <Memberships> elements.

# OwnerNamespace

This element contains four children:

# Info

This element contains four children:

# Handle

This element contains three children:

# Memberships

This element only contains one or multiple <Membership> elements.

# Membership

This element has three children:

# Members

This element only contains one or multiple <Member> elements.

# Member

This element has only one attribute:

This element contains seven children:

This element also contains one of the following mutually exclusive children:

  1. <PassportName>: The user handle associated with this membership.
  2. <Email>: The e-mail address associated with this membership.
  3. <PhoneNumber>: The phone number associated with this membership.

This element also contains the following five children IF the <Type> is set to Passport:

# Examples

# Client/Request

POST /abservice/abservice.asmx HTTP/1.1
SOAPAction: http://www.msn.com/webservices/AddressBook/FindMembership
Cache-Control: no-cache
Content-Type: text/xml; charset=utf-8
Content-Length: 1190

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope
        xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
        xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
>
        <soap:Header>
                <ABApplicationHeader
                        xmlns="http://www.msn.com/webservices/AddressBook"
                >
                        <ApplicationID>996CDE1E-AA53-4477-B943-2BE802EA6166</ApplicationID>
                        <IsMigration>false</IsMigration>
                        <PartnerScenario>ContactSave</PartnerScenario>
                </ABApplicationHeader>
                <ABAuthHeader
                        xmlns="http://www.msn.com/webservices/AddressBook"
                >
                        <ManagedGroupRequest>false</ManagedGroupRequest>
                        <TicketToken>t=ticket&amp;p=profile</TicketToken>
                </ABAuthHeader>
        </soap:Header>
        <soap:Body>
                <FindMembership
                    xmlns="http://www.msn.com/webservices/AddressBook"
                >
                    <serviceFilter>
                        <Types>
                            <ServiceType>Messenger</ServiceType>
                        </Types>
                    </serviceFilter>
                    <View>Full</View>
                    <deltasOnly>false</deltasOnly>
                    <lastChange>0001-01-01T00:00:00.0000000-08:00</lastChange>
                </FindMembership>
        </soap:Body>
</soap:Envelope>

# Server/Response

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: 4253

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope
        xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>
        <soap:Header>
                <ServiceHeader
                        xmlns="http://www.msn.com/webservices/AddressBook"
                >
                        <Version>12.01.1111.0000</Version>
                        <CacheKey>12r1;MjAyNC0xMS0yMFQxMToyMDoyNy43MTVa</CacheKey>
                        <CacheKeyChanged>true</CacheKeyChanged>
                        <PreferredHostName>contacts.example.com</PreferredHostName>
                        <SessionId>ecfaf8c7-e388-4571-8641-b061a0ac4bdc</SessionId>
                </ServiceHeader>
        </soap:Header>
        <soap:Body>
            <FindMembershipResponse
                xmlns="http://www.msn.com/webservices/AddressBook"
            >
                <FindMembershipResult>
                    <Services>
                        <Service>
                            <Memberships>
                                <Membership>
                                    <MemberRole>Allow</MemberRole>
                                    <Members>
                                        <Member
                                            xsi:type="PassportMember"
                                        >
                                            <MembershipId>1</MembershipId>
                                            <Type>Passport</Type>
                                            <State>Accepted</State>
                                            <Deleted>false</Deleted>
                                            <LastChanged>2024-11-20T12:58:02.4680000-08:00</LastChanged>
                                            <JoinedDate>2024-10-10T20:38:51.0000000-08:00</JoinedDate>
                                            <ExpirationDate>0001-01-01T00:00:00</ExpirationDate>
                                            <Changes />
                                            <PassportName>anotheruser@hotmail.com</PassportName>
                                            <IsPassportNameHidden>false</IsPassportNameHidden>
                                            <PassportId>0</PassportId>
                                            <CID>4388220788362762</CID>
                                            <PassportChanges />
                                            <LookedupByCID>false</LookedupByCID>
                                        </Member>
                                        <Member
                                            xsi:type="PhoneMember"
                                        >
                                            <MembershipId>3</MembershipId>
                                            <Type>Phone</Type>
                                            <State>Accepted</State>
                                            <Deleted>false</Deleted>
                                            <LastChanged>2024-11-20T12:58:02.4680000-08:00</LastChanged>
                                            <JoinedDate>2024-10-22T21:40:16.0000000-08:00</JoinedDate>
                                            <ExpirationDate>0001-01-01T00:00:00</ExpirationDate>
                                            <Changes />
                                            <PhoneNumber>15551111222</PhoneNumber>
                                        </Member>
                                    </Members>
                                    <MembershipIsComplete>true</MembershipIsComplete>
                                </Membership>
                                <Membership>
                                    <MemberRole>Reverse</MemberRole>
                                    <Members>
                                        <Member
                                            xsi:type="PassportMember"
                                        >
                                            <MembershipId>2</MembershipId>
                                            <Type>Passport</Type>
                                            <State>Accepted</State>
                                            <Deleted>false</Deleted>
                                            <LastChanged>2024-11-20T12:58:02.4680000-08:00</LastChanged>
                                            <JoinedDate>2024-10-10T20:38:51.0000000-08:00</JoinedDate>
                                            <ExpirationDate>0001-01-01T00:00:00</ExpirationDate>
                                            <Changes />
                                            <PassportName>anotheruser@hotmail.com</PassportName>
                                            <IsPassportNameHidden>false</IsPassportNameHidden>
                                            <PassportId>0</PassportId>
                                            <CID>4388220788362762</CID>
                                            <PassportChanges />
                                            <LookedupByCID>false</LookedupByCID>
                                        </Member>
                                    </Members>
                                    <MembershipIsComplete>true</MembershipIsComplete>
                                </Membership>
                            </Memberships>
                            <Info>
                                <Handle>
                                    <Id>1</Id>
                                    <Type>Messenger</Type>
                                    <ForeignId />
                                </Handle>
                                <InverseRequired>false</InverseRequired>
                                <AuthorizationCriteria>Everyone</AuthorizationCriteria>
                                <IsBot>false</IsBot>
                            </Info>
                            <Changes />
                            <LastChange>2024-11-20T12:58:02.4680000-08:00</LastChange>
                            <Deleted>false</Deleted>
                        </Service>
                    </Services>
                    <OwnerNamespace>
                        <Info>
                            <Handle>
                                <Id>00000000-0000-0000-0000-000000000000</Id>
                                <IsPassportNameHidden>false</IsPassportNameHidden>
                                <CID>0</CID>
                            </Handle>
                            <CreatorPuid>0</CreatorPuid>
                            <CreatorCID>4294967298</CreatorCID>
                            <CreatorPassportName>example@hotmail.com</CreatorPassportName>
                        </Info>
                        <Changes />
                        <CreateDate>2024-10-10T20:38:51.0000000-08:00</CreateDate>
                        <LastChange>2024-11-20T12:58:02.4680000-08:00</LastChange>
                    </OwnerNamespace>
                </FindMembershipResult>
            </FindMembershipResponse>
        </soap:Body>
</soap:Envelope>