Box API call doesn't return external users
How can we get external users information from Get Enterprise Users query ? We’re using “user_type=external” parameter but the result is empty.
For more details, please see our API calls below.
thanks,
Kobi
GET https://api.box.com/2.0/users/?offset=0&limit=100&user_type=external HTTP/1.1 User-Agent: Box Windows SDK v3.0.0 Authorization: Bearer Host: api.box.com Accept-Encoding: gzip, deflate HTTP/1.1 200 OK Strict-Transport-Security: max-age=31536000 Cache-Control: no-cache, no-store BOX-REQUEST-ID: 0os0sialbopd3i0jq34jt7m95ce Date: Tue, 20 Mar 2018 05:48:06 GMT Content-Type: application/json Vary: Accept-Encoding Age: 2 Connection: keep-alive Content-Length: 53 {"total_count":0,"entries":[],"limit":100,"offset":0} ------------------------------------------------------------------ GET https://api.box.com/2.0/users/?offset=0&limit=100&user_type=managed HTTP/1.1 User-Agent: Box Windows SDK v3.0.0 Authorization: Bearer Host: api.box.com Accept-Encoding: gzip, deflate HTTP/1.1 200 OK Strict-Transport-Security: max-age=31536000 Cache-Control: no-cache, no-store Vary: Accept-Encoding BOX-REQUEST-ID: 07s80hpnqcjh7mj5alhuot4krsq Date: Tue, 20 Mar 2018 05:48:07 GMT Content-Type: application/json Age: 0 Connection: keep-alive Content-Length: 4775 {"total_count":11,"entries" } ------------------------------------------------------------------ GET https://api.box.com/2.0/users/?offset=0&limit=100&user_type=all HTTP/1.1 User-Agent: Box Windows SDK v3.0.0 Authorization: Bearer Host: api.box.com Accept-Encoding: gzip, deflate HTTP/1.1 200 OK Strict-Transport-Security: max-age=31536000 Cache-Control: no-cache, no-store Vary: Accept-Encoding BOX-REQUEST-ID: 081s275c2pmm3u6th01ee7kpbrv Date: Tue, 20 Mar 2018 05:48:08 GMT Content-Type: application/json Age: 1 Connection: keep-alive Content-Length: 4775 {"total_count":11,"entries" } ------------------------------------------------------------------
-
Hi, if I understand your question correctly I think you are asking why this happens and how to fix it?
The API doesn't return anything for external users once the file/folder ownership has been changed. It's kinda that simple. I have this problem in Splunk on an integrated Box API. Events will return "External Folder" if a managed user uploads something to an out of company Box account or if the managed user turns over a folder they've created to another Box Account. I've actually seen managed users upload company documents to personal Box accounts on external folders and I can do nothing about it. The best I've seen is that in Content Manager, you can sometimes see the accessible_by_name owner.
I've done some testing with this and it seems that it's out of Box's control since the Folder/Files Ids and object are not actually owned by the managed user-- which is outside your authorization. I think I got to the conclusion that you've have to piece together event logs to see when the changed occurred (say if someone moved a company folder to an external folder), but after that, all your vizability is gone.
If any other user on here as a better understanding or an actual fix to this, I'd like to know as well.
I hope that helps, I apologize if I explained something you already knew.
-
Hi Amwiler,
In regards to the problem with External Business Partner we have to utilize 2 API's. As I have developed one solution for Folder Ownership transfer to External Users. Whenever, the folder is being transferred outside the tenant we do not get the folder name. We need that folder name in order to notify the offender and to restore it back.
Using Enterprise Event API pull the Enterprise Log of particular event_type like 'move' . Filter the accessible_by, if it is outside domain then make another call to capture detail about the event using "As-user" feature.
This feature will be enabled by Box Team for your Enterprise App.
Make a "As-user" call using User Event API you will get all the details. One need to have minimum Co-admin to perform this task.
Similarly, anything which goes outside the box enterprise tenant cannot be captured or queried.
The best way is to look out for Events and then break it to query for more details.
Hope it helps!
I will soon publish my solution for all.
サインインしてコメントを残してください。
コメント
3件のコメント