Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
    • Yandex Cloud Partner program
  • Blog
  • Pricing
  • Documentation
© 2025 Direct Cursus Technology L.L.C.
Yandex Identity and Access Management
    • All guides
    • Handling secrets that are available in the public domain
        • Getting an IAM token for a Yandex account
        • Getting an IAM token for a service account
        • Getting an IAM token for a federated account
        • Revoking an IAM token
      • Managing static access keys
      • Managing API keys
      • Managing authorized keys
      • Creating a temporary access key using Security Token Service
  • Secure use of Yandex Cloud
  • Access management
  • Pricing policy
  • Role reference
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Release notes
  1. Step-by-step guides
  2. Authentication
  3. IAM tokens
  4. Revoking an IAM token

Revoking an IAM token

Written by
Yandex Cloud
Updated at May 5, 2025

You can revoke an IAM token you got earlier. You may need to do this, for example, if the token is compromised or if you are getting a new one.

To revoke an IAM token:

CLI
API

If you do not have the Yandex Cloud CLI yet, install and initialize it.

The folder specified when creating the CLI profile is used by default. To change the default folder, use the yc config set folder-id <folder_ID> command. You can specify a different folder using the --folder-name or --folder-id parameter.

  1. Check out the description of the IAM token revocation command:

    yc iam revoke-token --help
    
  2. Revoke the IAM token by specifying it in this command:

    yc iam revoke-token \
      --iam-token "<IAM_token>"
    

    Result:

    subject_id: ajei280a73vc********
    

Run an http request specifying the IAM token to revoke:

curl \
  --request POST \
  --header 'Content-Type: application/json' \
  --header "Authorization: Bearer <IAM_token>" \
  --data '{
      "iamToken": "<IAM_token>"
  }' \
  https://iam.api.cloud.yandex.net/iam/v1/tokens:revoke

Result:

{
  "subjectId": "ajei280a73vc********"
}

See alsoSee also

  • Getting an IAM token for a Yandex account
  • Getting an IAM token for a federated account
  • Getting an IAM token for a service account

Was the article helpful?

Previous
Getting an IAM token for a federated account
Next
Getting a list of refresh tokens
© 2025 Direct Cursus Technology L.L.C.