Update the user's role via API


User profiles that were created or updated incorrectly might experience duplicate or missing user metadata. As a result, the user might get an "Access Denied" error when attempting to access KMS/KAF applications. In this case, the following troubleshooting steps can be taken.

A. To view the missing user's role via the Management Console.

  1. Go to the KMS/KAF Management Console > Manage Users tab.
  2. Search for the affected user. You might notice that the user does not have a proper role configured.
  3. Copy the affected user ID.

B. To view the missing user's role via the API.

  1. Go to the API console at https://developer.kaltura.com/console/ (Sign In) or  http://www.kaltura.com/api_v3/testme.
  2. Generate a KS (relevant when Testme Console is used)
    See How to Start a Kaltura Session using the TestMe Console.
  3. Session Service: metadata
  4. action: list
  5. Click Edit next to filter (KalturaMetadataFilter)
  6. Go to metadataObjectTypeEqual and change to USER
  7. On the ObjectIDEqual enter the affected User ID
  8. Review the results on which metadata might be = 0

C. To update the user's role.

  1. Session Service: metadata
  2. Select Action: Add
  3. metadataProfileId You can search it from userRoleProfile or copy it from a working user details.
  4. ObjectType: USER
  5. ObjectID: User ID
  6. XMLData:  <metadata><role>privateOnlyRole</role></metadata>
    (the role added in this example is privateOnlyRole, other roles can be viewerRole, adminRole, unmoderatedAdminRole)


If the issue isn't resolved, try to delete the metadata and add it again. To delete metadata:
Select service: metadata
Select action: Delete
id: [Enter the <id> as found in the XML output]


Was this article helpful?
Thank you for your feedback!
User Icon

Thank you! Your comment has been submitted.

In This Article
Related Articles
Back to top

Never miss a thing!

Subscribe to our customer newsletter and our release notes updates, so you always get the best out of Kaltura.
Newsletter