Hi,
While fetching files from user of my organization. I am unable to fetch shared documents which is shared by user which is not in my organization. So, is it expected behavior. Also, in total count it displayed count with shared files but in entries it did not return the shared files.
I am getting below response:
{
"total_count": 7,
"entries": [
{
"type": "folder",
"id": "1",
"etag": "0",
"name": "folder-1"
},
{
"type": "folder",
"id": "2",
"etag": "0",
"name": "folder-2"
},
{
"type": "folder",
"id": "3",
"etag": "0",
"name": "folder-3"
},
{
"type": "folder",
"id": "4",
"etag": "0",
"name": "folder-4"
},
{
"type": "file",
"id": "5",
"etag": "0",
"name": "file-1"
},
{
"type": "file",
"id": "6",
"etag": "0",
"name": "file-2"
}
],
"offset": 0,
"limit": 1000,
"order": [
{
"by": "type",
"direction": "ASC"
},
{
"by": "name",
"direction": "ASC"
}
]
}
Here you can saw that total_count was 7 but I am getting only 6 entries as 1 was shared by user which is not in my organization.
Hello,
What endpoint are you using? Can you tell me more about how you are going about calling for the files? I did some testing and I’m seeing files from other organizations returned.
Thanks,
Alex, Box Developer Advocate
Hello @smartoneinok, I am using “https://api.box.com/2.0/folders/0/items” API to list all items available in root folder.
To Reproduce,
I have created access token with my admin account using CCG. Now I am trying to fetch files of user-1’s root folder using as-user header parameter.
Here, user-2 has shared one file to user-1 but “user-2 is not in my organization (It’s free Account)”. So, currently user-1 have 4 folders and 3 files in his root folder (one is shared by user-2). But in response i got total_count=7 which is correct, but in entries i am getting only 6 entries.
App configuration:
App Access Level: App + Enterprise Access
Application Scopes:
NOTE: In Content Section of Admin console I am not able to see that file.
I think it’s related to permissions.
Hey @smartoneinok 👋, Did you get a chance to look at this issue.
Hello - still investigating.
If you login as User 1 from the web app, do you see the file there?
Yes, I am able to see that with User 1 creds.
hey, are you able to reproduce this ?
Hi - yes I reproduced it. I created a ticket with our internal system team. I suspect that is is not a supported feature of the API. I will let you know when I hear back.
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.