Create User over API not use the Template
-
Hi everyone,
we have the problem that the XML-API does not create the users-folder on the desired drive.
If I create the user by hand it works.
<Request encoding="utf-8" version="18.0" echo="Yes" verbose="No"> <Operation>CreateUser</Operation><Parameters> <Domain>' + $Dom + '</Domain><GroupMembership><Group>AlleMitarbeiter</Group></GroupMembership><Mailbox>' + $Mailbox + '</Mailbox> <Details> <Password>' + $Benutzer.passwortmail + '</Password><FirstName>' + $Vorname + '</FirstName> <LastName>' + $Nachname + '</LastName></Details> </Parameters> </Request>'Or do i have to change the version number.I updated to md 23, there it is the same.Regards Daniel
-
Are you including the mdaemon and api tags around that? For instance
<mdaemon> <api> your stuff </api> </mdaemon>
-
no it also works. Only the path is not desired drive.
But good idea i will test.
-
Arron Staff
The XML API is designed to not allow you to specify the drive/path when using the CreateUser operation. You can either let the new account template determine it, of you can set the MailboxRoot Path for that domain (only a global admin can do this), and any accounts created within that domain will create mailboxes under that path.
-
Keith Staff
The API does not allow for setting the full mailbox path in CreateUser/UpdateUser. It either uses the New Account Template or it will use (if present), the MailboxRoot path for a given domain.
ie.
<?xml version="1.0" encoding="utf-8"?>
<MDaemon>
<API productversion="23.0.0" serviceversion="23.0.0.1">
<Request version="23.0" echo="1" verbose="0">
<Operation>UpdateDomain</Operation>
<Parameters>
<Domain>sample.int</Domain>
<Users>
<MailboxRoot>\\SHIELD-MAIL01\MDaemon\Mailboxes\sample.int</MailboxRoot>
</Users>
</Parameters>
</Request>
</API>
</MDaemon>Then, any new accounts created in sample.int would be under \\SHIELD-MAIL01\MDaemon\Mailboxes\sample.int
-
Hi all many thanks for your help.
@Arron Caruth do you mean this
@Keith Personett can i do that on mdaemon application or in one dat file?
-
Keith Staff
Daniel.
This is not a function of MDaemon, it is strictly a part of the XmlApi.
You can execute that UpdateDomain request and specify the new Users/MailboxRoot path and all accounts created within that domain via the XmlApi from that point on will be created under that path. If you wish to revert back to the New Account template, then update the domain with an empty MailboxRoot value.
-
Hi Keith,
the api call worked.
Many Thanks.