Share via


Hosted Exchange::EnableUser

This procedure enables a user object in Active Directory and records a billing event.

Arguments

Input Arguments Required Description

Ldap path

Yes

LDAP path of user.

preferredDomainController

Yes

Output Arguments

None.

Remarks

Method Syntax

public string EnableUser( 
string ldapPath,  
string preferredDomainController) 
        

Sample Code

Typical C# Usage

//Get user name and password. 
        string userName = this.Request.ServerVariables.Get("AUTH_USER"); 
        string pass = this.Request.ServerVariables.Get("AUTH_PASSWORD"); 
        //Set credentials. 
        hostedExch.PreAuthenticate = true; 
        hostedExch.Credentials = new NetworkCredential(userName,pass); 
 
        lblMsg.InnerHtml = mpsResponseHeaderLabel; 
                                 
        //Display response. 
        this.mpsResponse.DocumentSource = ""; 
        response = hostedExch.EnableUser(path,preferredDomainController); 
                         
        // set the response XML to match the return from MPF 
        responseXml.LoadXml(response); 
        this.mpsResponse.Document = responseXml; 
        lblDone.InnerText = successMsg; 
        

Applies To

Hosted Exchange Web Service for:

  • Hosted Messaging and Collaboration version 3.5

  • Hosted Messaging and Collaboration version 3.0

See also

Tasks

Hosted Exchange::DisableUser