Where can I see the user after creating an End User via API?

Hello,

I’m having trouble seeing the end user in MediaSpace when it’s created via an API call. I’d appreciate any pointers!

Here’s what I’m doing to create an End User:
KalturaUser newKalturaUser = new KalturaUser(); newKalturaUser.id = userId; newKalturaUser.firstName = firstName; newKalturaUser.lastName = lastName; newKalturaUser.screenName = userId; newKalturaUser.fullName = firstName + " "+ lastName; client.getUserService().add(newKalturaUser);
This seems to add an end user, because when I list users or get user
client.getUserService().list();
or
client.getUserService().get(userId);
user is there.

However, when I go to the Manage Users page (http://[instanceId].mediaspace.kaltura.com/admin/user-list), I don’t see the user I just added. I can go through the UI to add a new user and the user will show up in the UI and via the API “getUser”/“listUser” call.

Also, I do not expect this end user to show up in the KMC user list, but in KMC UI, we’re able to assign a content to this user that we can’t even see via UI. So we just can’t see this user anywhere, and can’t update or delete this user unless we go through the API call.

(And just a note, using KalturaAdminUser object instead of KalturaUser works just fine when we want to add an admin user to KMC - the admin user shows up in the KMC user list.)

So what do I need to do in addition to just adding an end user for it to show up in the Manage Users page in MediaSpace?

Thank you,
Kumi

Hi, I think this is related to your question: How to create a new KMC User using APIs

Thanks, kshp. I actually saw that post as well. I did use the KalturaAdminUser object to create a user in KMC and actually see the admin user in the KMC users list. What I need is a way to create a KMS(MediaSpace) end user, which sounds like it’s done by using the KalturaUser object. And it actually gets created and I can even query using the get API to confirm that the end user is there. It just does not show up in the KMS Manage Users list. It seemed like an end user needed an “application role”, but there’s no API method to assign that to a KalturaUser, unless I’m missing something…

Thanks!
Kumi

Hello,
You need to add xml metadata to the user entry.

  1. Get an example of metadata for existing users by calling (using API console): “metadata -> list -> metadataObjectTypeEqual=USER”;
  2. Add metadata for the required user: “metadata -> add -> …fill required fields”;
  3. Try to login.

Hope this helps.

Thanks, kshp. I actually got in touch (indirectly) with Kaltura support and got the same suggestion. In case someone else is stuck, here’s a gist of what I needed to do in order for the user to be associated with KMS.

Once new KalturaUser with userId has been added, get the metadataProfileId for the KMS using the MetadataProfileService. Then you can add the user to the KMS with an “adminRole” (for example) by

client.getMetadataService().add(metadataProfileId, KalturaMetadataObjectType.USER, userId, "<metadata><role>adminRole</role></metadata>");
This isn’t specific to KMS - just use different metadataProfile if KAF, etc.

To disable the user, delete this metadata (not the user).

Kumi