Exchange Provider::CreateAddressList

The CreateAddressList method creates an address list in the All Address Lists container and also sets permissions. This address list is to be included in the OAB; it is not intended for customized address lists. The AL is set as a well-known object on the organization using the otherWellKnownObjects attribute. This combines the DN of the AL with a special GUID that identifies it as the AL used for the OAL, assuming that only one address list (a copy of the GAL) is included with the OAL.

The CreateAddressList method performs the following steps:

  • Creates the address list in the All Address Lists container.

  • Sets the default purportedSearch attribute, if it is not specified in the Filter parameter.

  • Grants following permissions to the principals specified in <readAccess>

    • Read b. Execute

    • Read Permissions

    • List Contents

    • Read Properties

    • Open Address List

  • Sets the new address list as an otherWellKnownObjects attribute on the organization, by using the value: WKGUID=9E444526CB6F4d5c9A59C9A84E26B627.

Arguments

Input argument Required Description

Path

Yes

The Lightweight directory access protocol (LDAP) path of the organization.

Name

No

The name of address list. Default name is the RDN of the org .

ReadAccess

No

The groups and users that have read access to the address list. This parameter can have multi-values, such as an LDAP path, a DN, a UPN, or DOMAIN\SAMAccount, as shown in the following examples:

<readAccess>LDAP://server/cn=johnc,ou=litware,dc=fabrikam,dc=com 
</readAccess> 
<readAccess>LDAP://cn=johnc,ou=litware,dc=fabrikam,dc=com</readAccess> 
<readAccess>cn=johnc,ou=litware,dc=fabrikam,dc=com</readAccess> 
<readAccess>johnc@litware.com</readAccess> 
<readAccess>fabrikam\johnc</readAccess> 

Filter

No

The purportedSearch attribute of the address list. When using the Filter parameter, be sure to properly escape the characters in the XML. The escape characters for & are & including the semicolon. For example:

<filter>(&amp;(mailNickName=*)(userPrincipalName=*litware.com)) 
</filter> 

The default for the purportedSearch attribute is:

purportedSearch = (&(mailNickName=*)(!(msExchHideFromAddressLists=TRUE))(otherWellKnownObjects=B:32:B7AE2ABCCBAD41a28973559FCA154DB0:OU=litware,OU=consolidatedmessenger,DC=fabrikam,DC=com)(|(&(objectCategory=person)(objectClass=user))(&(objectCategory=person)(objectClass=contact)) 
(objectCategory=group)(objectCategory=publicFolder))) 

Remarks

Rollback Calls

The CreateAddressList method calls the DeleteAddressList method on transaction rollback.

Sample Code

Example XML Request

The following is an example of an XML request for the CreateAddressList method of the Exchange Provider:

<request> 
    <data/> 
        <procedure> 
            <execute namespace='Exchange Provider' 
             procedure='CreateAddressList'> 
                <executeData> 
                <path>LDAP://fabrikam.com/ 
                 OU=litware,OU=consolidatedmessenger,DC=fabrikam, 
                 DC=com 
                </path> 
                <readAccess>  
                 LDAP://fabrikam.com/ 
                 CN=litware_admins,OU=litware,OU=consolidatedmessenger, 
                 DC=fabrikam,DC=com 
                </readAccess> 
                <readAccess>  
                 LDAP://fabrikam.com/ 
                 CN=litware_users,OU=litware,OU=consolidatedmessenger, 
                 DC=fabrikam,DC=com 
                </readAccess> 
                <name>litware</name> 
                </executeData> 
            </execute> 
        </procedure> 
</request> 

Example XML Response

No example XML response.

Applies To

Exchange Provider API for:

  • Hosted Messaging and Collaboration version 3.5

  • Hosted Messaging and Collaboration version 3.0

See also

Tasks

Exchange Provider::DeleteAddressList