Search code examples
pythonwebdavcaldav

How can I create a new principal on a CalDAV/WebDAV server?


I want to programmatically create a principal with a calendar for every user of my web site. There is lots of documentation on how to create calendars, but I have a hard time finding anything on creating principals.

Any hint is appreciated, preferred language is python, but docs for other languages could help me as well.

Thank you for your help!


Solution

  • WebDAV ACL does not provide a way to manage principals. And I'm not aware of any draft/RFC adding that feature.

    In short: You can't manage principals using WebDAV and how principals are backed is highly server specific.

    Some servers may use the LDAP standard to manage their accounts, for example the CalDAV server which is part of macOS X Server does. If the LDAP server is configured to allow that (which often is not the case), you may be able to create accounts using that protocol. I'm sure there are Python libraries providing access to LDAP.

    Other servers often provide proprietary protocols or tools to create accounts.