Skip to content

Issue: Core Authorization fails when adding Roles to User #198

Description

@jakbutler

Description

The new Core Authorization support is sending a list of Role objects when assigning roles to a User via the UserEntity. The API is expecting a list of Strings.

Prerequisites

Environment

  • Version of this library used: 1.13.0
  • Version of Java used: jdk1.8.0_102
  • Additional libraries that might be affecting your instance: N/A

Reproduction

Calling the addRoles or removeRoles endpoints via the UsersEntity, as below, returns a 400 error:

// in this example, role is of type com.auth0.json.mgmt.Role
getManagementAPI().users().addRoles("userId", Collections.singletonList(role)).execute()
{
  "statusCode": 400,
  "error": "Bad Request",
  "message": "Payload validation error: \u0027Expected type string but found type object\u0027 on property roles[0].",
  "errorCode": "invalid_body"
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions