Any way to retrieve all of the account details at once | MDaemon Technologies, Ltd.

Any way to retrieve all of the account details at once


  • Using the GetUserInfo function, but I've only been able to get one account worth of info at a time, which takes quite a bit of time when getting 200+ users.  I've tried substituing <Mailbox>[username]</Mailbox> below with <Mailbox>*</Mailbox> but it failed.

     

    $body = "<?xml version=`"1.0`" encoding=`"utf-8`"?>
    <MDaemon>
        <API>
            <Request version=`"21.0.0`" echo=`"1`" verbose=`"0`">
                <Operation>GetUserInfo</Operation>
                <Parameters>
                    <Domain>[domainname]</Domain>
                    <Mailbox>[username]</Mailbox>
                    <Get>
                        <All/>
                    </Get>
                </Parameters>
            </Request>
        </API>
    </MDaemon>"
    
    $Response = Invoke-WebRequest -Uri $Server -Method Post -UserAgent $UserAgent -Body $body -Credential $mdcreds -ContentType Text/XML


  • Look at the GetDomainInfo Sample : GetDomainInfo_sample.int.xml

    You can tell GetDomainInfo to also return account infomration for that domain


  • @Keith Personett I actually do use that to get the base list of users ids, then cycle through that to get the info for each user.  Is there a way to get the info for all of the users at once?


  • <?xml version="1.0" encoding="utf-8"?>
    <MDaemon>
    	<API productversion="23.5.0" serviceversion="23.5.0.1">
    		<Request version="23.0" echo="1" verbose="0">
    			<Operation>GetDomainInfo</Operation>
    			<Parameters>
    				<Domain>sample.int</Domain>
    				<Get>
    					<Users>
    						<Roles/>
    						<Quotas/>
    						<Details/>
    						<Aliases/>
    						<ListMembership/>
    						<GroupMembership/>
    						<EAS>
    							<Devices/>
    							<DeviceInfo/>
    						</EAS>
    					</Users>
    				</Get>
    			</Parameters>
    		</Request>
    	</API>
    </MDaemon>
    

  • @Keith Personett  That worked.  Thank you very much.


Please login to reply this topic!