sym.sdk.integrations.okta¶
Helpers for interacting with the Okta API within the Sym SDK.
Functions
|
Returns Okta User Info for the Sym user. |
|
Checks if the provided user is a member of the Okta group specified. |
|
Returns a list of Okta Group Info. |
|
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.list_groups(*, name_filter: Optional[str] = None, filter: Optional[str] = None, expand: Optional[List[str]] = None, only_native_groups: bool = True) List[dict] ¶
Returns a list of Okta Group Info.
The arguments match the arguments in Okta’s List Groups API, details here
- Parameters
name_filter – Finds a group whose name starts with
name_filter
, case-insensitive.filter –
A filter expression for groups. See here for syntax and details. Note: The expressions for filter queries must use double quotes:
filter='id eq "00g12345"'
expand – If specified, additional metadata will be included in the response. Possible values are:
stats
and/orapp
.only_native_groups – If true, only groups of source type “Native Okta” (i.e. the only group source type modifiable by Sym) will be included in the results. See here for more information on Okta group source types.
- Returns
A list of dictionaries, with each dictionary representing a Group in Okta’s Group structure. See here for details.
- 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.