@@ -12,12 +12,16 @@ class GroupAsync(AsyncHTTPBase):
1212 async def load_all_groups (
1313 self ,
1414 tenant_id : str ,
15+ sso_id : Optional [str ] = None ,
1516 ) -> dict :
1617 """
1718 Load all groups for a specific tenant id.
1819
1920 Args:
2021 tenant_id (str): Tenant ID to load groups from.
22+ sso_id (str): Optional SSO configuration id (ssoId) to load only groups that came from
23+ that SSO configuration. Use the reserved id "default_ssoid" for the tenant's default
24+ SSO configuration. When omitted, all the tenant's groups are returned.
2125
2226 Return value (dict):
2327 Return dict in the format
@@ -26,6 +30,7 @@ async def load_all_groups(
2630 "id": <group id>,
2731 "display": <display name>,
2832 "source": <"scim" or "jit">,
33+ "ssoId": <sso configuration id>,
2934 "members":[
3035 {
3136 "loginId": <loginId>,
@@ -40,11 +45,14 @@ async def load_all_groups(
4045 Raise:
4146 AuthException: raised if load operation fails
4247 """
48+ body = {
49+ "tenantId" : tenant_id ,
50+ }
51+ if sso_id is not None :
52+ body ["ssoId" ] = sso_id
4353 response = await self ._http .post (
4454 MgmtV1 .group_load_all_path ,
45- body = {
46- "tenantId" : tenant_id ,
47- },
55+ body = body ,
4856 )
4957 return response .json ()
5058
@@ -53,6 +61,7 @@ async def load_all_groups_for_members(
5361 tenant_id : str ,
5462 user_ids : Optional [List [str ]] = None ,
5563 login_ids : Optional [List [str ]] = None ,
64+ sso_id : Optional [str ] = None ,
5665 ) -> dict :
5766 """
5867 Load all groups for the provided user IDs or login IDs.
@@ -61,6 +70,9 @@ async def load_all_groups_for_members(
6170 tenant_id (str): Tenant ID to load groups from.
6271 user_ids (List[str]): Optional List of user IDs, with the format of "U2J5ES9S8TkvCgOvcrkpzUgVTEBM" (example), which can be found on the user's JWT.
6372 login_ids (List[str]): Optional List of login IDs, how the users identify when logging in.
73+ sso_id (str): Optional SSO configuration id (ssoId) to load only groups that came from
74+ that SSO configuration. Use the reserved id "default_ssoid" for the tenant's default
75+ SSO configuration. When omitted, all matching groups are returned.
6476
6577 Return value (dict):
6678 Return dict in the format
@@ -69,6 +81,7 @@ async def load_all_groups_for_members(
6981 "id": <group id>,
7082 "display": <display name>,
7183 "source": <"scim" or "jit">,
84+ "ssoId": <sso configuration id>,
7285 "members":[
7386 {
7487 "loginId": <loginId>,
@@ -86,27 +99,34 @@ async def load_all_groups_for_members(
8699 user_ids = [] if user_ids is None else user_ids
87100 login_ids = [] if login_ids is None else login_ids
88101
102+ body = {
103+ "tenantId" : tenant_id ,
104+ "loginIds" : login_ids ,
105+ "userIds" : user_ids ,
106+ }
107+ if sso_id is not None :
108+ body ["ssoId" ] = sso_id
89109 response = await self ._http .post (
90110 MgmtV1 .group_load_all_for_member_path ,
91- body = {
92- "tenantId" : tenant_id ,
93- "loginIds" : login_ids ,
94- "userIds" : user_ids ,
95- },
111+ body = body ,
96112 )
97113 return response .json ()
98114
99115 async def load_all_group_members (
100116 self ,
101117 tenant_id : str ,
102118 group_id : str ,
119+ sso_id : Optional [str ] = None ,
103120 ) -> dict :
104121 """
105122 Load all members of the provided group id.
106123
107124 Args:
108125 tenant_id (str): Tenant ID to load groups from.
109126 group_id (str): Group ID to load members for.
127+ sso_id (str): Optional SSO configuration id (ssoId): return the group only if it came
128+ from that SSO configuration. Use the reserved id "default_ssoid" for the tenant's
129+ default SSO configuration.
110130
111131 Return value (dict):
112132 Return dict in the format
@@ -115,6 +135,7 @@ async def load_all_group_members(
115135 "id": <group id>,
116136 "display": <display name>,
117137 "source": <"scim" or "jit">,
138+ "ssoId": <sso configuration id>,
118139 "members":[
119140 {
120141 "loginId": <loginId>,
@@ -129,11 +150,14 @@ async def load_all_group_members(
129150 Raise:
130151 AuthException: raised if load operation fails
131152 """
153+ body = {
154+ "tenantId" : tenant_id ,
155+ "groupId" : group_id ,
156+ }
157+ if sso_id is not None :
158+ body ["ssoId" ] = sso_id
132159 response = await self ._http .post (
133160 MgmtV1 .group_load_all_group_members_path ,
134- body = {
135- "tenantId" : tenant_id ,
136- "groupId" : group_id ,
137- },
161+ body = body ,
138162 )
139163 return response .json ()
0 commit comments