Skip to main content

I have an Enterprise account where they hd shared a folder with us. Using the CCG auth with the user ID of mine. I get the reperesentations but it’s not showing any collaborators. Is it any settings set by the admin of the enterprise for that folder.


Or is there any issue with the collaborations view permissions



But when calling the collaborators of the folder I get a group.


The issue is also that when I login I can see my login as viewer but when my frind login they can see their emails as viewer but not mine.

Hello ✋,



I don’t think I have enough information to actually help appropriately.



Can you share with me the client id of of the ccg application?



It would also be helpful to see some of the code you are running and the screenshots of the information you’re receiving/not getting. I’m not quite sure I understand what you are saying is missing.



Thanks,


Alex, Box Developer Advocate 🥑


Hi @smartoneinok ,



Sorry for not providing an accurate question.


My issue is that:


I have an Enterprise account of my clinet. They had created three accounts for us.


Enabled a folder name MyFolder with full access for me using one of the created account. Here I can view the collaborators even via API.



But the client’s own folder was shared with the created account with VIEWER permission. When I login I can see the admin as the owner and myself in that folder. Also, when I login using the other two accounts, I see the admin user and the currently logged in user name only.



Even though it is clear that the admin and the other three account has access to that folder (other three as viewer).



So when I use the CCG auth using one of the user id, I get the collaborators. but that is only the admin. I don’t get my emails or others as collaborators when clearly three emails has viewer permission.



Could you please help?


I believe I understand what you are saying.



All of the different collaboration levels have different features, based on the type. While not listed, I’m going to assume viewer doesn’t have access to see other collaborators except the owner of the content - since a viewer cannot invite other collaborators. If you want to see all the collaborators, its best to use the owner of the content as the user making the API call. The viewer type is pretty restricted based on the chart.


I did some testing with a basic node script… and I seem to see the other collaborators of a folder even when in viewer permission. I wonder if its something in the app settings.



const BoxSDK = require('box-node-sdk');



async function logFolderCollabs(folderID){

const sdkConfig = {

boxAppSettings: {

clientID: "CLIENT_ID",

clientSecret: "CLIENT_SECRET"

},

// enterpriseID: "ENTERPRISE_ID"

}

const sdk = BoxSDK.getPreconfiguredInstance(sdkConfig)



const client = sdk.getCCGClientForUser("USER_ID");

const collaborations = await client.folders.getCollaborations(folderID)



// Iterate over the array of collaborations

collaborations.entries.forEach(collaboration => {

// Log the details of each collaboration

console.log(`Login: ${collaboration.accessible_by.login}`);

});

}



logFolderCollabs('FOLDER_ID')



Can you send me your client id?


CLIENT_ID=cu7i4yvpqmguzcl5ufye0ws5bkcgmxes


Sorry for the delay - I was out for the holidays.



Looking at the client id - things look setup correctly. Can you do me a favor and have the admin of your box instance reauthorize the application? Sometimes this updates the applications permissions.



After that, can you you try running the above code, and send me back what you get?



Thanks!


Reply