458
Views
11
Comments
Solved
How to get user with role in ODC ?
Question

Is there anyway to get aggregate User with ... role 
For example 
App A = 3 roles (PO, PM, CS)

How to get user with PO role ?

Thanks!

2024-07-05 14-16-55
Daniël Kuhlmann
 
MVP
Solution

Hi Kittisak,

Unfortunately this is currently not an easy task in ODC, as system entities like Role and User_Role don't exist. OutSystems is planning on exposing the User model via an API but that is not available yet, and also no details are shared on how the API will look like.

The only way you can do this now is to use the CheckRole action of a role against a user. The CheckRole action cannot be used in an aggregate in ODC.

Regards,

Daniel

UserImage.jpg
Kittisak Pakdeedindan

Thank you for your information. I will find another way to do.

2026-01-15 03-18-59
Vijay Malviya

Hi @Daniël Kuhlmann,

As per your post when and how can we access role and user Role table without ODC portal.


Regards,

Vijay M.

2024-07-05 14-16-55
Daniël Kuhlmann
 
MVP

You can not as I wrote, no public User Management API is available yet. It is expected to be released before the end of the year. Porbably in the form of a REST API, personally I don't think you get metadata tables as in O11.


2024-10-15 05-27-39
Kritikz

Hey  , as public API are released by outsystems , User and Access Management API - ODC Documentation ,   i have followed all the prerequisite  but still not able to run API ,getting this error

 Error: getaddrinfo ENOTFOUND  

2024-07-05 14-16-55
Daniël Kuhlmann
 
MVP

Hi,

If you need help, don't post in an existing thread. Create a new question.

When you have a question, then share all the details you have, so the community can effectively help you.

I have tested the new API, its easy to use and works. You probably didn't configure correct the base URL of the API, hence the 404 NOT FOUND. But this is just guess work, as you didn't provide any details, like a screenshot of your API configuration or an OML with your code.

Regards,

Daniel

2024-10-15 05-27-39
Kritikz

I am getting 401  error


2024-07-05 14-16-55
Daniël Kuhlmann
 
MVP

in that case you did probably not follow all the correct steps, to obtain the endpoint to request the access token, or the access token you have is no longer valid.

Either way, without sharing more information, I can only guess. 

2024-10-15 05-27-39
Kritikz

is it fine to post access token here? , access token generated few hours ago only

i am trying to access this api

https://ODC_DOMAIN/api/identity/v1/application-roles 

2025-01-12 10-53-58
MatheusLima

Did you find the solution? Can I help you?

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.