Coadmin permission

新規投稿

コメント

5件のコメント

  • Murtza

     Based on the steps you described, you updated the user's role correctly.

     

    To get a user's role from the API, you have to request the role field when getting info about the user. The role field is not included in the standard set of fields. Try this call to get the Co-Admin's role:

     

    curl "https://api.box.com/2.0/users/REPLACE_WITH_USER_ID?fields=role" \
    -H "Authorization: Bearer REPLACE_WITH_TOKEN"

     

     

     

    0
    コメントアクション パーマリンク
  • emilyfu

    Thanks! It works to get role.

    And I also want to know do you have api to assign different permissions(I list them in the original post, such as manage users, manage groups and so on) for coadmin??

    0
    コメントアクション パーマリンク
  • LoCortes

    Hello ,

     

    I thought that the fields exposed would be on the SDKs that box team builds and I found this class: https://github.com/box/box-java-sdk/blob/master/src/main/java/com/box/sdk/BoxUser.java.

     

    It contains the following piece of code:

     

        /**
         * An array of all possible file fields that can be requested when calling {@link #getInfo(String...)}.
         */
        public static final String[] ALL_FIELDS = {"type", "id", "name", "login", "created_at", "modified_at", "role",
            "language", "timezone", "space_amount", "space_used", "max_upload_size", "tracking_codes",
            "can_see_managed_users", "is_sync_enabled", "is_external_collab_restricted", "status", "job_title", "phone",
            "address", "avatar_url", "is_exempt_from_device_limits", "is_exempt_from_login_verification", "enterprise",
            "my_tags", "hostname", "is_platform_access_only", "external_app_user_id"};

    I guess these are all the fields exposed to the API. So... no way to retrieve or set specifics for a co-admin. That is an important limitation if you want to develop your own admin console. Probably something to be added to the backlog ? 🙂

     

    Thanks!

    0
    コメントアクション パーマリンク
  • emilyfu

    Thank you for help.

    0
    コメントアクション パーマリンク
  • Dipali Vasandi (Departed)

    I am trying to assign coadmin role to the existing user in postman and i am sending role:coadmin in body but i am getting 400 Bad request.

    Please suggest what would be the api

    0
    コメントアクション パーマリンク

投稿コメントは受け付けていません。