Okta.Sdk.Api.GroupOwnerApi

October 22, 2025 ยท View on GitHub

All URIs are relative to https://subdomain.okta.com

MethodHTTP requestDescription
AssignGroupOwnerPOST /api/v1/groups/{groupId}/ownersAssign a group owner
DeleteGroupOwnerDELETE /api/v1/groups/{groupId}/owners/{ownerId}Delete a group owner
ListGroupOwnersGET /api/v1/groups/{groupId}/ownersList all group owners

AssignGroupOwner

GroupOwner AssignGroupOwner (string groupId, AssignGroupOwnerRequestBody assignGroupOwnerRequestBody)

Assign a group owner

Assigns a group owner

Example

using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;

namespace Example
{
    public class AssignGroupOwnerExample
    {
        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 GroupOwnerApi(config);
            var groupId = 00g1emaKYZTWRYYRRTSK;  // string | The `id` of the group
            var assignGroupOwnerRequestBody = new AssignGroupOwnerRequestBody(); // AssignGroupOwnerRequestBody | 

            try
            {
                // Assign a group owner
                GroupOwner result = apiInstance.AssignGroupOwner(groupId, assignGroupOwnerRequestBody);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling GroupOwnerApi.AssignGroupOwner: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
groupIdstringThe `id` of the group
assignGroupOwnerRequestBodyAssignGroupOwnerRequestBody

Return type

GroupOwner

Authorization

apiToken, oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
201Success-
400Bad Request-
403Forbidden-
404Not Found-
429Too Many Requests-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

DeleteGroupOwner

void DeleteGroupOwner (string groupId, string ownerId)

Delete a group owner

Deletes a group owner from a specific group

Example

using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;

namespace Example
{
    public class DeleteGroupOwnerExample
    {
        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 GroupOwnerApi(config);
            var groupId = 00g1emaKYZTWRYYRRTSK;  // string | The `id` of the group
            var ownerId = 00u1emaK22TWRYd3TtG;  // string | The `id` of the group owner

            try
            {
                // Delete a group owner
                apiInstance.DeleteGroupOwner(groupId, ownerId);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling GroupOwnerApi.DeleteGroupOwner: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
groupIdstringThe `id` of the group
ownerIdstringThe `id` of the group owner

Return type

void (empty response body)

Authorization

apiToken, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
204No Content-
403Forbidden-
404Not Found-
429Too Many Requests-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ListGroupOwners

List<GroupOwner> ListGroupOwners (string groupId, string search = null, string after = null, int? limit = null)

List all group owners

Lists all owners for a specific group

Example

using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;

namespace Example
{
    public class ListGroupOwnersExample
    {
        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 GroupOwnerApi(config);
            var groupId = 00g1emaKYZTWRYYRRTSK;  // string | The `id` of the group
            var search = "search_example";  // string | SCIM filter expression for group owners. Allows you to filter owners by type. (optional) 
            var after = "after_example";  // string | Specifies the pagination cursor for the next page of owners (optional) 
            var limit = 1000;  // int? | Specifies the number of owner results in a page (optional)  (default to 1000)

            try
            {
                // List all group owners
                List<GroupOwner> result = apiInstance.ListGroupOwners(groupId, search, after, limit).ToListAsync();
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling GroupOwnerApi.ListGroupOwners: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
groupIdstringThe `id` of the group
searchstringSCIM filter expression for group owners. Allows you to filter owners by type.[optional]
afterstringSpecifies the pagination cursor for the next page of owners[optional]
limitint?Specifies the number of owner results in a page[optional] [default to 1000]

Return type

List<GroupOwner>

Authorization

apiToken, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200Success-
403Forbidden-
404Not Found-
429Too Many Requests-

[Back to top] [Back to API list] [Back to Model list] [Back to README]