1

how to obtain Id from user

Тема: how to obtain Id from user

Hello,

How many options do I have to get the ID from user? from password is not possble isn t?

thanks

Locating things
2

how to obtain Id from user

Re: how to obtain Id from user

If you need current user id, token/login, core/use_auth_hash returns it at login.

If you need to get id by user name, you need to authorize as any user, that has access to the target user and call core/search_items with following params:

{
 "spec": {
  "itemsType": "user",
  "propName": "sys_name",
  "propValueMask": "some",
  "sortType": "",
  "propType": "property"
 },
 "force": 1,
 "flags": 1,
 "from": 0,
 "to": 1
}

Response:

{
 "searchSpec": {...},
 "dataFlags": 1,
 "totalItemsCount": 1,
 "indexFrom": 0,
 "indexTo": 0,
 "items": [
  {
   "nm": "some",
   "cls": 1,
   "id": 20,
   "mu": 0,
   "uacl": -1
  }
 ]
}
3

how to obtain Id from user

Re: how to obtain Id from user

no, what I need is how to get the id of the user, no if he has rights or not...
thanks

Locating things