Getting a list of group names for a user in OScript (querying OTDS)

I have a custom OScript REST API and I need to check the group membership of the user as I want to limit access to the API to a specific group. The group is available in the connected OTDS instance.

Is there sample code to do this?

Tagged:

Comments

  • You want to query OTDS or check ContentServer. If Content Server, you can get the group using UAPI.GetById, then UAPI.Explode to get a list of group members, then check to see if your user is one of the members.

    Cheers...