I can not get a user information including the organization info

Hi.

I tried to get user information including the organization info. But, I get user informations without organization info. by API (using /odata/Users(UserID))… How can i get this??

I enabled unit function in web.config and created the 2 units except ‘default’, and then the user id put in the created unit.

{
@odata.context”:
“Name”:"",
“Surname”:"",
“UserName”:“admin”,
“Domain”:null,
“FullName”:"",
“EmailAddress”:"admin@defaulttenant.com",
“IsEmailConfirmed”:false,
“LastLoginTime”:
“IsActive”:true,
“CreationTime”:
“AuthenticationSource”:null,
“Password”:
“RolesList”:
[
]
,
“LoginProviders”:
[
]
,
“TenantId”:1,
“TenancyName”:“Default”,
“Type”:“User”,
“Id”:2,
“NotificationSubscription”:
{
“Queues”:true,
“Robots”:true,
“Jobs”:true,
“Schedules”:true
}
}

Thank you.

1 Like

Did you tried testing manually using postman or some other tools?

HI, megharajky.

Thank you for reply.

Yes. I tested with the ‘RESTDebugger’ manually. The ‘RESTDebugger’ is installed when the delphi being installed.

Above all i’d like to get all of organization information related the Users.

For example there is the user(name is ‘Test’) in Unit ‘A’ and ‘B’ and then i would get the Organizaton information with only Unit ‘A’ and ‘B’ when i try to API ‘GET /odata/Users(Test)’.

Oh, I see!

I used odata query option that is ‘$expand’ like this ‘~/odata/Users(Test)?$expand=OrganizationUnits’

It’s works!

Thank you for interested in my post. :slight_smile:

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.