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.
Adds a new OAuth2 application to your organization.
Assigns a group to an application
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
activate_application(client, app_id)
View Sourceactivate_application(Okta.client(), String.t()) :: Okta.result()
Activates an inactive application.
https://developer.okta.com/docs/reference/api/apps/#activate-application
add_application(client, app, activate \\ true)
View Sourceadd_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
add_oauth2_application(client, label, client_credentials, client_settings, activate \\ true)
View Sourceadd_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
assign_group_to_application(client, app_id, group_id, app_group \\ %{})
View Sourceassign_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
assign_user_to_application(client, app_id, user_id, credentials \\ %{}, profile \\ %{})
View Sourceassign_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
deactivate_application(client, app_id)
View Sourcedeactivate_application(Okta.client(), String.t()) :: Okta.result()
Deactivates an active application.
https://developer.okta.com/docs/reference/api/apps/#deactivate-application
delete_application(client, app_id)
View Sourcedelete_application(Okta.client(), String.t()) :: Okta.result()
Removes an inactive application.
https://developer.okta.com/docs/reference/api/apps/#delete-application
filter_applications(client, filter, opts \\ [])
View Sourcefilter_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
get_application(client, application_id)
View Sourceget_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
get_group_for_application(client, application_id, group_id)
View Sourceget_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
get_user_for_application(client, application_id, user_id)
View Sourceget_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
list_applications(client, opts \\ [])
View Sourcelist_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
list_applications_for_group(client, group_id, opts \\ [])
View Sourcelist_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
list_applications_for_key(client, key, opts \\ [])
View Sourcelist_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
list_applications_for_user(client, user_id, expand \\ false, opts \\ [])
View Sourcelist_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
list_groups_for_application(client, application_id, opts \\ [])
View Sourcelist_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
list_users_for_application(client, application_id, opts \\ [])
View Sourcelist_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
remove_group_from_application(client, app_id, group_id)
View Sourceremove_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
remove_user_from_application(client, app_id, user_id)
View Sourceremove_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
update_application(client, app_id, app)
View Sourceupdate_application(Okta.client(), String.t(), map()) :: Okta.result()
Updates an application in your organization.
https://developer.okta.com/docs/reference/api/apps/#update-application
update_user_for_application(client, app_id, user_id, credentials, profile)
View Sourceupdate_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