update_organization_members_role

imerit_ango.sdk.SDK.

update_organization_members_role(organization_id, role_updates)

Modify the roles of specified members within the organization.

Parameters

  • organization_id: string

  • role_updates: List[RoleUpdate]

    • RoleUpdate

      • email: string

      • organizationRole: OrganizationRoles

        • {Member, Admin}

        • Example: OrganizationRoles.Admin

Returns:

  • output: dict

Example

import os
from dotenv import load_dotenv
from imerit_ango.sdk import SDK
from imerit_ango.models.invite import RoleUpdate
from imerit_ango.models.enums import OrganizationRoles

load_dotenv('variables.env')
api_key = os.getenv('API_KEY')
organization_id = os.getenv('ORGANIZATION_ID')

ango_sdk = SDK(api_key)

role_update_1 = RoleUpdate(email="user1@example.com", organizationRole=OrganizationRoles.Admin)
role_update_2 = RoleUpdate(email="user2@example.com", organizationRole=OrganizationRoles.Admin)

sdk_response = ango_sdk.update_organization_members_role(organization_id=organization_id,
                                                         role_updates=[role_update_1, role_update_2])

Last updated