Skip to main content
Question

Python SDK - Add Group Admin membership with 'configurable_permissions=None'

  • May 22, 2025
  • 7 replies
  • 35 views

Forum|alt.badge.img

Hello,

 

*Using Python 3.7.3 and latest boxsdk==2.3.2

 

Problem: I am attempting to add a managed user as 'Group Admin' member and ensure that they have no additional configurable permissions.

 

Right now I am passing configurable_permission=None but it is not setting the permissions to Null.

    try:
        user = sa_client.user(boxUserId)
        role='admin'
        membership = sa_client.group(group_id=groupID).add_member(user, role, configurable_permissions=None)
        membershipID = membership.id
        pr('- Group Membership ID: ' + membershipID)
        pr('- Added {0} to the {1} group!'.format(
            membership.user.name, membership.group.name))

 

When I inspect the users Group Admin permissions they have everything selected.

BOX_l83z5xz4te8dauyrextmuu8du2v03x3p.png

 

using Postman to return the group membership confirms all values are set to 'true' instead of 'false' for each of the settings. Do I need to make a subsequent update of membership API request and pass a dict of false / null values for each setting?

...
    "group": {
        "type": "group",
        "id":***phone number removed for privacy***",
        "name": "PS-P1-Shared",
        "group_type": "managed_group"
    },
    "role": "admin",
    "configurable_permissions": {
        "can_create_accounts": true,
        "can_edit_accounts": true,
        "can_instant_login": true,
        "can_run_reports": true
    },
...
}

 

Many Thanks,

Peter

 

7 replies

Forum|alt.badge.img

Hey  

 

Thanks for raising this issue -- it looks like you opened an issue on the GitHub repo as well. A fix for this has been merged into the python SDK master branch, but a new release has not been cut yet. 

 

In order to use the updated code, you use 

pip install git+https://github.com/box/box-python-sdk.git

I'd recommend checking the commit history before updating as there may be other changes which affect your existing code.

Let us know if you have any further issues! 


Forum|alt.badge.img

Hi  ,

 

Thanks for your response. I have not logged this group permission issue with the Github repo yet. Can you confirm the same behaviour as I am seeing before I log anything? Just want to make sure I am not missing something.

 

Peter


Forum|alt.badge.img

 -- it looks the same as what you're reporting. The problem, as I understand it, is that the "none" option was being treated as the default setting (all of the configurable permissions). You can review the opened issue here.


Forum|alt.badge.img

True, they are related issues in that they both need to send 'None' value ...but one was for shared link endpoint and this one is for group permissions. I will need to test if the latest commit will change the behaviour of both issues and if needed log the group one separately

 

Thanks,

Peter


Forum|alt.badge.img

Thanks for clarifying ! Appreciate you catching that.


Forum|alt.badge.img

Hi  ,

 

I tested this again today with most recent version [boxsdk==2.4.1] and still experiencing the same outcome.

I have logged a specific issue [432] relating to the group admin case on the python SDK for review.

 

Thanks,

Peter


Forum|alt.badge.img

This issue has now been resolved with sdk latest release (v. 2.5.0) thanks to @Cary Cheng!