sym.sdk.integrations.okta

Helpers for interacting with the Okta API within the Sym SDK.

Functions

get_user_info(user)

Returns Okta User Info for the Sym user.

is_user_in_group(user, *, group_id)

Checks if the provided user is a member of the Okta group specified.

users_in_group(*, group_id)

Get all users from the specified Okta group.

sym.sdk.integrations.okta.get_user_info(user: sym.sdk.user.User) dict

Returns Okta User Info for the Sym user.

The user info follows the data format of Okta’s Users API, details here: https://developer.okta.com/docs/reference/api/users/#response-example-10

Parameters

user – The Sym user to request Okta info for

Returns

A dict of user info

sym.sdk.integrations.okta.is_user_in_group(user: sym.sdk.user.User, *, group_id: str) bool

Checks if the provided user is a member of the Okta group specified.

The Okta group’s ID must be given, and the method will check that the group exists and is accessible. An exception will be thrown if not.

Parameters
  • user – The user to check group membership of.

  • group_id – The ID of the Okta group.

Returns

True if the user is a member of the specified Okta group, False otherwise.

sym.sdk.integrations.okta.users_in_group(*, group_id: str) List[sym.sdk.user.User]

Get all users from the specified Okta group.

The Okta group’s ID must be given, and the method will check that the group exists and is accessible. An exception will be thrown if not.

Parameters

group_id – The ID of the Okta group.