okta_api v0.1.14 Okta.Apps View Source

The Okta.Apps module provides access methods to the Okta Apps 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_applications(client)

Link to this section Summary

Functions

Activates an inactive application.

Adds a new application to your organization.

Assign a user to an application which can be done with and wihout application specific credentials and profile for SSO and provisioning

Deactivates an active application.

Removes an inactive application.

Enumerates apps added to your organization with pagination given a specific filter expression

Fetches an application from your Okta organization by application_id.

Fetches an application group assignment

Fetches a specific user assignment for an application by id.

Enumerates apps added to your organization with pagination. A subset of apps can be returned that match a supported filter expression or query.

Enumerates all applications assigned to a group

Enumerates all applications using a key.

Enumerates all applications assigned to a user and optionally embeds their Application User in a single response.

Enumerates group assignments for an application

Enumerates all assigned application users for an application.

Removes a group assignment from an application.

Removes an assignment for a user from an application.

Updates an application in your organization.

Update a user for an application, either a profile, credentials or both can be provided.

Link to this section Functions

Link to this function

activate_application(client, app_id)

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

Activates an inactive application.

https://developer.okta.com/docs/reference/api/apps/#activate-application

Link to this function

add_application(client, app, activate \\ true)

View Source
add_application(Okta.client(), map(), boolean()) :: Okta.result()

Adds a new application to your organization.

The app parameter is a map containing the app specific name, signOnMode and settings. The API documentation has examples of different types of apps and the required parameters.

Examples

    client = Okta.Client("https://dev-000000.okta.com", "thisismykeycreatedinokta")
    {:ok, result, _env} = Okta.Apps.add_application(client, %{
      name: "bookmark", label: "Sample bookmark App", signOnMode: "BOOKMARK", settings: %{ app: %{ requestIntegration: false, url: "https://example.com/bookmark.htm"}}
    })

https://developer.okta.com/docs/reference/api/apps/#add-application

Link to this function

add_oauth2_application(client, label, client_credentials, client_settings, activate \\ true)

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

Adds a new OAuth2 application to your organization.

The label parameter is a string readablle label for the applicatio, while client_credentials and settings are the configured of the application. None of the values of client_credentials are required but client_settings have different requirements depending on what is set for grant_types (which is required) in settings

Examples

Okta.Apps.add_oauth2_application(client,
                                 "Label",
                                 %{},
                                 %{grant_types: ["implicit"],
                                   redirect_uris: ["http://localhost:3000/implicit/callback"],
                                   response_types: ["id_token", "token"],
                                   application_type: "browser"})

The API documentation has examples of different types of apps and the required parameters.

https://developer.okta.com/docs/reference/api/apps/#add-oauth-2-0-client-application

Link to this function

assign_group_to_application(client, app_id, group_id, app_group \\ %{})

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

Assigns a group to an application

https://developer.okta.com/docs/reference/api/apps/#application-group-operations

Link to this function

assign_user_to_application(client, app_id, user_id, credentials \\ %{}, profile \\ %{})

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

Assign a user to an application which can be done with and wihout application specific credentials and profile for SSO and provisioning

https://developer.okta.com/docs/reference/api/apps/#application-user-operations

Link to this function

deactivate_application(client, app_id)

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

Deactivates an active application.

https://developer.okta.com/docs/reference/api/apps/#deactivate-application

Link to this function

delete_application(client, app_id)

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

Removes an inactive application.

https://developer.okta.com/docs/reference/api/apps/#delete-application

Link to this function

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

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

Enumerates apps added to your organization with pagination given a specific filter expression

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

Link to this function

get_application(client, application_id)

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

Fetches an application from your Okta organization by application_id.

https://developer.okta.com/docs/reference/api/apps/#get-application

Link to this function

get_group_for_application(client, application_id, group_id)

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

Fetches an application group assignment

https://developer.okta.com/docs/reference/api/apps/#get-assigned-group-for-application

Link to this function

get_user_for_application(client, application_id, user_id)

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

Fetches a specific user assignment for an application by id.

https://developer.okta.com/docs/reference/api/apps/#get-assigned-user-for-application

Link to this function

list_applications(client, opts \\ [])

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

Enumerates apps added to your organization with pagination. A subset of apps can be returned that match a supported filter expression or query.

See API documentation for valid optional parameters

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

Link to this function

list_applications_for_group(client, group_id, opts \\ [])

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

Enumerates all applications assigned to a group

https://developer.okta.com/docs/reference/api/apps/#list-applications-assigned-to-group

Link to this function

list_applications_for_key(client, key, opts \\ [])

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

Enumerates all applications using a key.

https://developer.okta.com/docs/reference/api/apps/#list-applications-using-a-key

Link to this function

list_applications_for_user(client, user_id, expand \\ false, opts \\ [])

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

Enumerates all applications assigned to a user and optionally embeds their Application User in a single response.

https://developer.okta.com/docs/reference/api/apps/#list-applications-assigned-to-user

Link to this function

list_groups_for_application(client, application_id, opts \\ [])

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

Enumerates group assignments for an application

https://developer.okta.com/docs/reference/api/apps/#list-groups-assigned-to-application

Link to this function

list_users_for_application(client, application_id, opts \\ [])

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

Enumerates all assigned application users for an application.

https://developer.okta.com/docs/reference/api/apps/#list-users-assigned-to-application

Link to this function

remove_group_from_application(client, app_id, group_id)

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

Removes a group assignment from an application.

https://developer.okta.com/docs/reference/api/apps/#remove-group-from-application

Link to this function

remove_user_from_application(client, app_id, user_id)

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

Removes an assignment for a user from an application.

https://developer.okta.com/docs/reference/api/apps/#remove-user-from-application

Link to this function

update_application(client, app_id, app)

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

Updates an application in your organization.

https://developer.okta.com/docs/reference/api/apps/#update-application

Link to this function

update_user_for_application(client, app_id, user_id, credentials, profile)

View Source
update_user_for_application(
  Okta.client(),
  String.t(),
  String.t(),
  map() | nil,
  map() | nil
) :: Okta.result()

Update a user for an application, either a profile, credentials or both can be provided.

https://developer.okta.com/docs/reference/api/apps/#update-application-credentials-for-assigned-user