Show users and groups in KAF after adding them through API

Hi,

We where having some problems making users visible in KAF after adding them through the API. (We are using the Kaltura.Client.Library for c#) After finding this post I managed to make them visible:

https://forum.kaltura.org/t/where-can-i-see-the-user-after-creating-an-end-user-via-api/4348

The thing was to add an entry with the metadata service like this:

var metadataResult = await MetadataService.Add(settings.UserRoleProfileId, MetadataObjectType.USER, User.Id, “privateOnlyRole”).ExecuteAsync(client);

The value of UserRoleProfileId I need is shown in the KAF environment. So this works and the added user shows up in the KAF environment.

After this I have to add groups, but this presents me with the same problem. Groups added through the API don’t show up in KAF. My questions are, do I have to add metadata for a group to? And if so, what do I use as MetadataObjectType because there is no group enum value. And what value for the last parameter containing xml data?

I’ve also tried to list the metadata through the API with the metadata list call:
https://developer.kaltura.com/api-docs/service/metadata/action/list

Problem with this is this call needs an objectId in the filter. I can’t seem to find the id of which object I need to pass in the filter…

Hi @robberg ,

After this I have to add groups, but this presents me with the same problem. Groups added through the API don’t show up in KAF.

Could you be more specific with regards to what you mean by “don’t show up”? Presumably, you’re using the group.add() action to add the groups, after successfully doing so, where do you not see the newly added group?

Problem with this is this call needs an objectId in the filter. I can’t seem to find the id of which object I need to pass in the filter…

The expected value for objectId depends on the metadataObjectTypeEqual value. For example, if it is an “ENTRY” schema, it will be the entry ID, if it is a “USER” schema, it will be the user ID.

Cheers,