CDS API createPrincipal parameters

Hello,

I’m now working with CDS API and creating Users. Following the CDS documentation I used the createPrincipal(String directoryServiceID, int principalType,String name,Map properties) method. It worked and created an user in My WebMethods, but only without all his additional attributes like: Middle Name, Address… which I passed to the method by – Map properties. When I use the same Map in the modifyPrincipal(String principalID, Map attributes) method, the user is modified and all his additional attributes are added.

My Map<String, Object> looks like:
map.put(“middle_name”, “middle_name” ));
map.put(“address1”, “address1” ));
map.put(“address2”, “address2” ));

Can you please tell me why no additional properties are added to a new created user by calling the method createPrincipal but with calling modifyPrincipal yes? I searched for the answer in the CDS API documentation, but found nothing. Am I passing bad Map to createPrincipal?

Thank you, Martin