---
name: iam-trustedprofile-iam-token
title: Generating an IAM token for a compute resource
description: You can request an Identity and Access Management (IAM) token for a trusted profile that represents your compute resource. The IAM access token is suitable for use as a bearer token in calls that require user or service credentials.
last-updated: 2026-03-20
---

> ## Documentation Index
> The table of contents for this documentation set is at https://cloud.ibm.com/docs/iam?format=markdown
> The index for all IBM Cloud docs is at: https://cloud.ibm.com/docs/llms.txt
> Use these files to discover more information as needed.

# Generating an IAM token for a compute resource
{: #trusted-profile-iam-token}

You can request an Identity and Access Management (IAM) token for a trusted profile that represents your compute resource. The IAM access token is suitable for use as a bearer token in calls that require user or service credentials.
{: shortdesc}

To generate IAM tokens for your compute resources, you must be at least an administrator on **All Identity and Access enabled services** within the account.



## Kubernetes Service
{: #kub-token}

For IBM Cloud&reg; Kubernetes Service, you don't need to take steps to generate an IAM token from a compute resource (CR) token. The token generation is done automatically by the service for new clusters that run Kubernetes version 1.21 or later. Trusted profiles are not supported for earlier versions of Kubernetes. See [Authorizing pods in your cluster to IBM Cloud services with IAM trusted profiles](https://cloud.ibm.com/docs/containers?topic=containers-pod-iam-identity&format=markdown) for more information.

## Red Hat OpenShift on IBM Cloud
{: #rhos-token}

Give application pods that run in your Red Hat&reg; OpenShift&reg; on IBM Cloud&reg; cluster access to IBM Cloud services by creating a trusted profile. For more information, see [Authorizing pods in your cluster to IBM Cloud services with IAM trusted profiles](https://cloud.ibm.com/docs/openshift?topic=openshift-pod-iam-identity&interface=ui&format=markdown).

## Virtual Servers for VPC
{: #vsi-token}

Virtual Servers for VPC uses different APIs for token creation. For more information, see [Using a trusted profile to call IAM-enabled services](https://cloud.ibm.com/docs/vpc?topic=vpc-imd-trusted-profile-metadata&format=markdown).

## IBM Cloud&reg; Code Engine
{: #code-engine}

In Code Engine, you can enable your components (applications, jobs, or functions) to support trusted profiles. For more information, see, [Working with trusted profiles in Code Engine to access IBM Cloud services](https://cloud.ibm.com/docs/codeengine?topic=codeengine-trusted-profiles&format=markdown).