ListUserAccounts
Lists users for the specified federation.
- TypeScript
- Python
import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";
const ListFederatedUserAccountsRequest =
cloudApi.organizationmanager.saml_federation_service
.ListFederatedUserAccountsRequest;
(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(serviceClients.FederationServiceClient);
const result = await client.listUserAccounts(
ListFederatedUserAccountsRequest.fromPartial({
federationId: "federationId",
// pageSize: 0,
// pageToken: "pageToken",
// filter: "filter"
})
);
console.log(result);
})();
import os
import grpc
import yandexcloud
from yandex.cloud.iam.v1.workload.oidc.federation_service_pb2_grpc import FederationServiceStub
from yandex.cloud.organizationmanager.v1.saml.federation_service_pb2 import (
ListFederatedUserAccountsRequest,
)
token = os.getenv("YC_OAUTH_TOKEN")
sdk = yandexcloud.SDK(token=token)
service = sdk.client(FederationServiceStub)
response = service.ListUserAccounts(
ListFederatedUserAccountsRequest(
federation_id="federationId",
# page_size = 0,
# page_token = "pageToken",
# filter = "filter"
)
)
print(response)
ListFederatedUserAccountsRequest
federationId
: string
ID of the federation to list user accounts for.
pageSize
: int64
The maximum number of results per page to return. If the number of available results is larger than page_size, the service returns a ListFederatedUserAccountsResponse.next_page_token that can be used to get the next page of results in subsequent list requests. Default value: 100.
pageToken
: string
Page token. To get the next page of results, set page_token to the ListFederatedUserAccountsResponse.next_page_token returned by a previous list request.
filter
: string
A filter expression that filters resources listed in the response. The expression must specify:
- The field name. Currently you can use filtering only on the name_id field.
- An
=
operator. - The value in double quotes (
"
). Must be 1-1000 characters long and match the regular expression[a-z0-9A-Z/@_.\-=+*\\]+
.
ListFederatedUserAccountsResponse
userAccounts
: UserAccount
List of user accounts for the specified federation.
nextPageToken
: string
This token allows you to get the next page of results for list requests. If the number of results is larger than ListFederatedUserAccountsRequest.page_size, use the next_page_token as the value for the ListFederatedUserAccountsRequest.page_token query parameter in the next list request. Each subsequent list request will have its own next_page_token to continue paging through the results.
UserAccount
Currently represents only Yandex account.
id
: string
ID of the user account.
One of userAccount
yandexPassportUserAccount
: YandexPassportUserAccountA YandexPassportUserAccount resource.
samlUserAccount
: SamlUserAccountA SAML federated user.
YandexPassportUserAccount
A YandexPassportUserAccount resource. For more information, see Yandex account.
login
: string
Login of the Yandex user account.
defaultEmail
: string
Default email of the Yandex user account.
SamlUserAccount
A SAML federated user. For more information, see federations.
Attribute
value
: string
federationId
: string
ID of the federation that the federation belongs to.
nameId
: string
Name Id of the SAML federated user. The name is unique within the federation. 1-256 characters long.
attributes
: Attribute
Additional attributes of the SAML federated user.