Jump to content

REST API creating a user with multiple roles


spierepf

Recommended Posts

I am trying to use the REST API to create users, and these users need to belong to a number of roles. The examples in the documentation all involve users with single roles. The descriptor that I send to the REST API looks like:

<user>
  <tenantId>xxx</tenantId>
  <username>xxx</username>
  <password>xxx</password>
  <fullName>xxx</fullName>
  <enabled>true</enabled>
  <roles>
    <roleName>ROLE_ALL</roleName>
    <roleName>ROLE_DISPENSARY</roleName>
    <roleName>ROLE_FRONTSTORE</roleName>
  </roles>
</user>

And the user descriptor that I get when I immediately ask the API to give me that user looks like:

<user>
  <enabled>true</enabled>
  <externallyDefined>false</externallyDefined>
  <fullName>xxx</fullName>
  <password>xxx</password>
  <roles>
    <externallyDefined>false</externallyDefined>
    <roleName>ROLE_FRONTSTORE</roleName>
  </roles>
  <tenantId>xxx</tenantId>
  <username>xxx</username>
</user>

Somewhere the two roles ROLE_DISPENSARY and ROLE_ALL disappear.

Does anyone have any idea why this might be? Can I only give a user a single role?

Peter

Link to comment
Share on other sites

  • 6 months later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...