All URIs are relative to https://subdomain.okta.com
Method | HTTP request | Description |
---|---|---|
AssignGroupToApplication | PUT /api/v1/apps/{appId}/groups/{groupId} | Assign an Application Group |
GetApplicationGroupAssignment | GET /api/v1/apps/{appId}/groups/{groupId} | Retrieve an Application Group |
ListApplicationGroupAssignments | GET /api/v1/apps/{appId}/groups | List all Application Groups |
UnassignApplicationFromGroup | DELETE /api/v1/apps/{appId}/groups/{groupId} | Unassign an Application Group |
UpdateGroupAssignmentToApplication | PATCH /api/v1/apps/{appId}/groups/{groupId} | Update an Application Group |
ApplicationGroupAssignment AssignGroupToApplication (string appId, string groupId, ApplicationGroupAssignment applicationGroupAssignment = null)
Assign an Application Group
Assigns a Group to an app, which in turn assigns the app to each User that belongs to the group. The resulting Application User scope is GROUP
since the assignment was from the group membership.
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class AssignGroupToApplicationExample
{
public static void Main()
{
Configuration config = new Configuration();
config.OktaDomain = "https://subdomain.okta.com";
// Configure API key authorization: apiToken
config.Token ="YOUR_API_KEY";
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new ApplicationGroupsApi(config);
var appId = 0oafxqCAJWWGELFTYASJ; // string | Application ID
var groupId = 00g1emaKYZTWRYYRRTSK; // string | The `id` of the group
var applicationGroupAssignment = new ApplicationGroupAssignment(); // ApplicationGroupAssignment | (optional)
try
{
// Assign an Application Group
ApplicationGroupAssignment result = apiInstance.AssignGroupToApplication(appId, groupId, applicationGroupAssignment);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ApplicationGroupsApi.AssignGroupToApplication: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
appId | string | Application ID | |
groupId | string | The `id` of the group | |
applicationGroupAssignment | ApplicationGroupAssignment | [optional] |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Success | - |
400 | Bad Request | - |
403 | Forbidden | - |
404 | Not Found | - |
429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApplicationGroupAssignment GetApplicationGroupAssignment (string appId, string groupId, string expand = null)
Retrieve an Application Group
Retrieves an app group assignment
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class GetApplicationGroupAssignmentExample
{
public static void Main()
{
Configuration config = new Configuration();
config.OktaDomain = "https://subdomain.okta.com";
// Configure API key authorization: apiToken
config.Token ="YOUR_API_KEY";
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new ApplicationGroupsApi(config);
var appId = 0oafxqCAJWWGELFTYASJ; // string | Application ID
var groupId = 00g1emaKYZTWRYYRRTSK; // string | The `id` of the group
var expand = group; // string | An optional query parameter to return the corresponding assigned [Group](/openapi/okta-management/management/tag/Group/) or the group assignment metadata details in the `_embedded` property. (optional)
try
{
// Retrieve an Application Group
ApplicationGroupAssignment result = apiInstance.GetApplicationGroupAssignment(appId, groupId, expand);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ApplicationGroupsApi.GetApplicationGroupAssignment: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
appId | string | Application ID | |
groupId | string | The `id` of the group | |
expand | string | An optional query parameter to return the corresponding assigned Group or the group assignment metadata details in the `_embedded` property. | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Success | - |
403 | Forbidden | - |
404 | Not Found | - |
429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List<ApplicationGroupAssignment> ListApplicationGroupAssignments (string appId, string q = null, string after = null, int? limit = null, string expand = null)
List all Application Groups
Lists all app group assignments
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class ListApplicationGroupAssignmentsExample
{
public static void Main()
{
Configuration config = new Configuration();
config.OktaDomain = "https://subdomain.okta.com";
// Configure API key authorization: apiToken
config.Token ="YOUR_API_KEY";
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new ApplicationGroupsApi(config);
var appId = 0oafxqCAJWWGELFTYASJ; // string | Application ID
var q = test; // string | Specifies a filter for a list of assigned groups returned based on their names. The value of `q` is matched against the group `name`. This filter only supports the `startsWith` operation that matches the `q` string against the beginning of the [Group name](https://developer.okta.com/docs/api/openapi/okta-management/management/tag/Group/#tag/Group/operation/listGroups!c=200&path=profile/name&t=response). (optional)
var after = 16275000448691; // string | Specifies the pagination cursor for the `next` page of results. Treat this as an opaque value obtained through the next link relationship. See [Pagination](https://developer.okta.com/docs/api/#pagination). (optional)
var limit = 20; // int? | Specifies the number of objects to return per page. If there are multiple pages of results, the Link header contains a `next` link that you need to use as an opaque value (follow it, don't parse it). See [Pagination](/#pagination). (optional) (default to 20)
var expand = group; // string | An optional query parameter to return the corresponding assigned [Group](/openapi/okta-management/management/tag/Group/) or the group assignment metadata details in the `_embedded` property. (optional)
try
{
// List all Application Groups
List<ApplicationGroupAssignment> result = apiInstance.ListApplicationGroupAssignments(appId, q, after, limit, expand).ToListAsync();
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ApplicationGroupsApi.ListApplicationGroupAssignments: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
appId | string | Application ID | |
q | string | Specifies a filter for a list of assigned groups returned based on their names. The value of `q` is matched against the group `name`. This filter only supports the `startsWith` operation that matches the `q` string against the beginning of the Group name. | [optional] |
after | string | Specifies the pagination cursor for the `next` page of results. Treat this as an opaque value obtained through the next link relationship. See Pagination. | [optional] |
limit | int? | Specifies the number of objects to return per page. If there are multiple pages of results, the Link header contains a `next` link that you need to use as an opaque value (follow it, don't parse it). See Pagination. | [optional] [default to 20] |
expand | string | An optional query parameter to return the corresponding assigned Group or the group assignment metadata details in the `_embedded` property. | [optional] |
List<ApplicationGroupAssignment>
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Success | - |
403 | Forbidden | - |
404 | Not Found | - |
429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void UnassignApplicationFromGroup (string appId, string groupId)
Unassign an Application Group
Unassigns a Group from an app
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class UnassignApplicationFromGroupExample
{
public static void Main()
{
Configuration config = new Configuration();
config.OktaDomain = "https://subdomain.okta.com";
// Configure API key authorization: apiToken
config.Token ="YOUR_API_KEY";
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new ApplicationGroupsApi(config);
var appId = 0oafxqCAJWWGELFTYASJ; // string | Application ID
var groupId = 00g1emaKYZTWRYYRRTSK; // string | The `id` of the group
try
{
// Unassign an Application Group
apiInstance.UnassignApplicationFromGroup(appId, groupId);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ApplicationGroupsApi.UnassignApplicationFromGroup: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
appId | string | Application ID | |
groupId | string | The `id` of the group |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
204 | No Content | - |
403 | Forbidden | - |
404 | Not Found | - |
429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApplicationGroupAssignment UpdateGroupAssignmentToApplication (string appId, string groupId, List jsonPatchOperation = null)
Update an Application Group
Updates a group assignment to an app
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class UpdateGroupAssignmentToApplicationExample
{
public static void Main()
{
Configuration config = new Configuration();
config.OktaDomain = "https://subdomain.okta.com";
// Configure API key authorization: apiToken
config.Token ="YOUR_API_KEY";
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new ApplicationGroupsApi(config);
var appId = 0oafxqCAJWWGELFTYASJ; // string | Application ID
var groupId = 00g1emaKYZTWRYYRRTSK; // string | The `id` of the group
var jsonPatchOperation = new List<JsonPatchOperation>(); // List<JsonPatchOperation> | (optional)
try
{
// Update an Application Group
ApplicationGroupAssignment result = apiInstance.UpdateGroupAssignmentToApplication(appId, groupId, jsonPatchOperation);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ApplicationGroupsApi.UpdateGroupAssignmentToApplication: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
appId | string | Application ID | |
groupId | string | The `id` of the group | |
jsonPatchOperation | List<JsonPatchOperation> | [optional] |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Success | - |
400 | Bad Request | - |
403 | Forbidden | - |
404 | Not Found | - |
429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]