okta_api v0.1.14 Okta.Groups View Source

The Okta.Groups module provides access methods to the Okta Groups API.

All methods require a Tesla Client struct created with Okta.client(base_url, api_key).

Examples

client = Okta.Client("https://dev-000000.okta.com", "thisismykeycreatedinokta")
{:ok, result, _env} = Okta.Groups.list_groups(client)

Link to this section Summary

Functions

Adds a user to a group with OKTA_GROUP type.

Adds a new group with OKTA_GROUP type to your organization.

Removes a group with OKTA_GROUP type from your organization.

Filter groups by expression.

Fetches a specific group by id from your organization.

Enumerates all applications that are assigned to a group.

Enumerates all users that are a member of a group. limit and after parameters provide for paging.

Enumerates groups in your organization with pagination.

Enumerates all groups with user memberships updated after the specified timestamp.

Enumerates all groups with a specific type.

Enumerates all groups with a profile updated after the specified timestamp.

Enumerates all groups with profile or user memberships updated after the specified timestamp.

Removes a user from a group with OKTA_GROUP type.

Searches for groups by name in your organization.

Updates the profile for a group with OKTA_GROUP type from your organization. The OKTA group profile object has a name and description attributes.

Link to this section Functions

Link to this function

add_user_to_group(client, group_id, user_id)

View Source
add_user_to_group(Okta.client(), String.t(), String.t()) :: Okta.result()

Adds a user to a group with OKTA_GROUP type.

https://developer.okta.com/docs/reference/api/groups/#add-user-to-group

Link to this function

create_group(client, profile)

View Source
create_group(Okta.client(), map()) :: Okta.result()

Adds a new group with OKTA_GROUP type to your organization.

The OKTA group profile object has a name and description attributes.

Examples

client = Okta.Client("https://dev-000000.okta.com", "thisismykeycreatedinokta")
{:ok, result} = Okta.Groups.create_group(client, %{
  name: "Designers", description: "All the designers"
})

https://developer.okta.com/docs/reference/api/groups/#add-group

Link to this function

delete_group(client, group_id)

View Source
delete_group(Okta.client(), String.t()) :: Okta.result()

Removes a group with OKTA_GROUP type from your organization.

https://developer.okta.com/docs/reference/api/groups/#remove-group

Link to this function

filter_groups(client, filter, opts \\ [])

View Source
filter_groups(Okta.client(), String.t(), keyword()) :: Okta.result()

Filter groups by expression.

See https://developer.okta.com/docs/reference/api/groups/#list-groups and https://developer.okta.com/docs/reference/api-overview/#filtering

Link to this function

get_group(client, group_id)

View Source
get_group(Okta.client(), String.t()) :: Okta.result()

Fetches a specific group by id from your organization.

https://developer.okta.com/docs/reference/api/groups/#get-group

Link to this function

list_group_apps(client, group_id, opt \\ [])

View Source

Enumerates all applications that are assigned to a group.

https://developer.okta.com/docs/reference/api/groups/#list-assigned-applications

Link to this function

list_group_members(client, group_id, opt \\ [])

View Source

Enumerates all users that are a member of a group. limit and after parameters provide for paging.

https://developer.okta.com/docs/reference/api/groups/#list-group-members

Link to this function

list_groups(client, opts \\ [])

View Source
list_groups(Okta.client(), keyword()) :: Okta.result()

Enumerates groups in your organization with pagination.

A subset of groups can be returned that match a supported filter expression or query.

See https://developer.okta.com/docs/reference/api/groups/#list-groups for optional parameters that can be passed in.

##Example

{:ok, result} = Okta.Users.list_groups(client, q: "Design", limit: 10, after: 200)
Link to this function

list_groups_membership_updated_after(client, updated_at, opts \\ [])

View Source
list_groups_membership_updated_after(
  Okta.client(),
  Calendar.datetime(),
  keyword()
) :: Okta.result()

Enumerates all groups with user memberships updated after the specified timestamp.

https://developer.okta.com/docs/reference/api/groups/#list-groups-with-membership-updated-after-timestamp

Link to this function

list_groups_of_type(client, type, opts \\ [])

View Source
list_groups_of_type(Okta.client(), String.t(), keyword()) :: Okta.result()

Enumerates all groups with a specific type.

https://developer.okta.com/docs/reference/api/groups/#list-groups-with-type

Link to this function

list_groups_profile_updated_after(client, updated_at, opts \\ [])

View Source
list_groups_profile_updated_after(Okta.client(), Calendar.datetime(), keyword()) ::
  Okta.result()

Enumerates all groups with a profile updated after the specified timestamp.

https://developer.okta.com/docs/reference/api/groups/#list-groups-with-profile-updated-after-timestamp

Link to this function

list_groups_updated_after(client, updated_at, opts \\ [])

View Source
list_groups_updated_after(Okta.client(), Calendar.datetime(), keyword()) ::
  Okta.result()

Enumerates all groups with profile or user memberships updated after the specified timestamp.

https://developer.okta.com/docs/reference/api/groups/#list-groups-updated-after-timestamp

Link to this function

remove_user_from_group(client, group_id, user_id)

View Source
remove_user_from_group(Okta.client(), String.t(), String.t()) :: Okta.result()

Removes a user from a group with OKTA_GROUP type.

https://developer.okta.com/docs/reference/api/groups/#remove-user-from-group

Link to this function

search_groups(client, name, opts \\ [])

View Source
search_groups(Okta.client(), String.t(), keyword()) :: Okta.result()

Searches for groups by name in your organization.

https://developer.okta.com/docs/reference/api/groups/#search-groups

Link to this function

update_group(client, group_id, profile)

View Source
update_group(Okta.client(), String.t(), map()) :: Okta.result()

Updates the profile for a group with OKTA_GROUP type from your organization. The OKTA group profile object has a name and description attributes.

https://developer.okta.com/docs/reference/api/groups/#update-group