func (client *ClientImpl) RevokeAuthorizations(ctx context.Context, args RevokeAuthorizationsArgs) error {
	if args.Revocations == nil {
		return &azuredevops.ArgumentNilError{ArgumentName: "args.Revocations"}
	}
	queryParams := url.Values{}
	if args.IsPublic != nil {
		queryParams.Add("isPublic", strconv.FormatBool(*args.IsPublic))
	}
	body, marshalErr := json.Marshal(*args.Revocations)
	if marshalErr != nil {
		return marshalErr
	}
	locationId, _ := uuid.Parse("a9c08b2c-5466-4e22-8626-1ff304ffdf0f")
	_, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1-preview.1", nil, queryParams, bytes.NewReader(body), "application/json", "application/json", nil)
	if err != nil {
		return err
	}
	return nil
}
[Preview API] Revokes the listed OAuth authorizations.
package tokenadmin
import (
	"bytes"
	"context"
	"encoding/json"
	"github.com/google/uuid"
	"github.com/microsoft/azure-devops-go-api/azuredevops"
	"net/http"
	"net/url"
	"strconv"
)
var ResourceAreaId, _ = uuid.Parse("af68438b-ed04-4407-9eb6-f1dbae3f922e")
type Client interface {
	CreateRevocationRule(context.Context, CreateRevocationRuleArgs) error
	ListPersonalAccessTokens(context.Context, ListPersonalAccessTokensArgs) (*TokenAdminPagedSessionTokens, error)
	RevokeAuthorizations(context.Context, RevokeAuthorizationsArgs) error
}
type ClientImpl struct {
	Client azuredevops.Client
}
func NewClient(ctx context.Context, connection *azuredevops.Connection) (Client, error) {
	client, err := connection.GetClientByResourceAreaId(ctx, ResourceAreaId)
	if err != nil {
		return nil, err
	}
	return &ClientImpl{
		Client: *client,
	}, nil
}
func (client *ClientImpl) CreateRevocationRule(ctx context.Context, args CreateRevocationRuleArgs) error {
	if args.RevocationRule == nil {
		return &azuredevops.ArgumentNilError{ArgumentName: "args.RevocationRule"}
	}
	body, marshalErr := json.Marshal(*args.RevocationRule)
	if marshalErr != nil {
		return marshalErr
	}
	locationId, _ := uuid.Parse("ee4afb16-e7ab-4ed8-9d4b-4ef3e78f97e4")
	_, err := client.Client.Send(ctx, http.MethodPost, locationId, "5.1-preview.1", nil, nil, bytes.NewReader(body), "application/json", "application/json", nil)
	if err != nil {
		return err
	}
	return nil
}
type CreateRevocationRuleArgs struct {
	RevocationRule *TokenAdminRevocationRule
}
func (client *ClientImpl) ListPersonalAccessTokens(ctx context.Context, args ListPersonalAccessTokensArgs) (*TokenAdminPagedSessionTokens, error) {
	routeValues := make(map[string]string)
	if args.SubjectDescriptor == nil || *args.SubjectDescriptor == "" {
		return nil, &azuredevops.ArgumentNilOrEmptyError{ArgumentName: "args.SubjectDescriptor"}
	}
	routeValues["subjectDescriptor"] = *args.SubjectDescriptor
	queryParams := url.Values{}
	if args.PageSize != nil {
		queryParams.Add("pageSize", strconv.Itoa(*args.PageSize))
	}
	if args.ContinuationToken != nil {
		queryParams.Add("continuationToken", *args.ContinuationToken)
	}
	if args.IsPublic != nil {
		queryParams.Add("isPublic", strconv.FormatBool(*args.IsPublic))
	}
	locationId, _ := uuid.Parse("af68438b-ed04-4407-9eb6-f1dbae3f922e")
	resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1-preview.1", routeValues, queryParams, nil, "", "application/json", nil)
	if err != nil {
		return nil, err
	}
	var responseValue TokenAdminPagedSessionTokens
	err = client.Client.UnmarshalBody(resp, &responseValue)
	return &responseValue, err
}
type ListPersonalAccessTokensArgs struct {
	SubjectDescriptor *string
	PageSize *int
	ContinuationToken *string
	IsPublic *bool
}