This was a valid XML in CalendarServer-5.2.2. It used to be 'user' now its 'record'
I could have a UID as 'gauravj'
<directory realm="Test Realm">
<record>
<uid>0C8BDE62-E600-4696-83D3-8B5ECABDFD2E</uid>
<guid>0C8BDE62-E600-4696-83D3-8B5ECABDFD2E</guid>
<short-name>admin</short-name>
<password>admin</password>
<full-name>Super User</full-name>
<email>
admin@example.com</email>
</record>
<record>
<uid>gauravj</uid>
<guid>gauravj</guid>
<password>some_password</password>
<email>
gauravj@example.com</email>
<full-name>G J</full-name>
<short-name>G</short-name>
</record>
</directory>
But I CalendarServer-6.0, I get
File "/usr/lib/python2.7/uuid.py", line 134, in __init__
raise ValueError('badly formed hexadecimal UUID string')
exceptions.ValueError: badly formed hexadecimal UUID string