Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions keepercommander/commands/scim.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,22 @@ def execute(self, params, node=None, **kwargs):

api.communicate(params, rq)
api.query_enterprise(params)
scim_url = get_scim_url(params, matched_node['node_id'])
node_id = matched_node['node_id']
logging.info('')
logging.info('SCIM ID: %d', rq['scim_id'])
logging.info('SCIM URL: %s', get_scim_url(params, matched_node['node_id']))
logging.info('SCIM URL: %s', scim_url)
logging.info('Provisioning Token: %s', token)
logging.info('')
return token
return {
'scim_id': rq['scim_id'],
'scim_url': scim_url,
'provisioning_token': token,
'node_name': self.get_node_path(params, node_id),
'node_id': node_id,
'prefix': prefix or '',
'unique_groups': kwargs.get('unique_groups', '') == 'on',
}


def find_scim(param, name): # type: (KeeperParams, any) -> dict
Expand Down
9 changes: 9 additions & 0 deletions keepercommander/service/util/parse_keeper_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,15 @@ def parse_response(command: str, response: Any, log_output: str = None) -> Dict[
Returns:
Dict[str, Any]: Structured JSON response
"""
if isinstance(response, dict) and 'scim create' in command:
if 'scim_id' in response and 'provisioning_token' in response:
base_cmd = command.split()[0] if command.split() else command
return {
"status": "success",
"command": base_cmd,
"message": "SCIM endpoint created successfully",
"data": response,
}
# Preprocess response once
response_str, is_from_log = KeeperResponseParser._preprocess_response(response, log_output)

Expand Down