How can I update LOGIN and EXTERNAL_AUTH_ID in Bitrix with an API call?

97 views Asked by At

In Bitrix how can I update the fields b_user.Login and b_user.EXTERNAL_AUTH_ID (login type) with an API call? I guess I should use the method user.update, but how do I have to reference this fields? Is it even possible to do this with the API?

1

There are 1 answers

0
Jacobs Monarch On

You can't update LOGIN or EXTERNAL_AUTH_ID user filds by using standard user.update endpoint.

If you have Bitrix24 On-Premise Edition, you can create new endpoint, like local.user.update and use CUser::Update(id,fields) method. For this you need to subscribe OnRestServiceBuildDescription event and pass method name, that returns description about endpoint handler.

Here is ref to docs