Welcome to the new Box Support website. Check out all the details here on what’s changed.

App Users created from .Net SDK cannot see folders or files - but they are there...

New post

Comments

3 comments

  • LoCortes

    Good afternoon ,

     

     as per the script you've enclosed I can see you are creating an APP User and try to use it immediately to recover documents but that user has not uploaded anything at all.

     

    In case that you want the APPUser to be able to see documents that belong to you (or to any user btw) you need to invite them as collaborators for a specific folder as you would do with any other user.

     

    Regards

    0
    Comment actions Permalink
  • mpalmer-sps

    Thank you   - its interesting that I've not seen anything on this in the guidance from the Box Developer docs. Perhaps I missed something - do you happen to have a sample where that action is completed?

    0
    Comment actions Permalink
  • LoCortes

    Good morning ,

     

    to do the first test I would avoid API and do the PoC manually. The user you have created is now on your box instance. You can go to your admin console and see the user there.

     

    Add the user to any folder as viewer, editor, whatever, and then run again the piece of script that returns the children of the shared folder. You will see that then you will see certain documents.

     

    Remember that the developer token use your user as the one login, that's the reason you see all your documents.

     

    If you use the service account created with the application or any app user newly created they will only see their own documents. 

     

    At API level you have to use the collaboration endpoint: https://developer.box.com/reference#collaboration-object

     

    This endpoint allows you to share documents and folders, but thing that you can share the content where you are editor or (co)owner. So, you can test it with two different app users. With APPUSER1 create some documents and upload a couple of folders. If you try at this point with APPUSER2 to access those documents you won't see them. So, with APPUSER1 again create a collaboration element adding APPUSER2 with any role (but uploader) and you will be able to see the documents on the shared folder.

     

    Hope this helps you.

     

    0
    Comment actions Permalink

Please sign in to leave a comment.