Skip to main content
This article shows two ways to authenticate to the Cognite Toolkit. Data engineers sign in as themselves. Cognite Toolkit administrators configure a service account for CI/CD. Install the CLI first. See Set up locally. To register the identity provider application and client secret, see Authentication and authorization.

Authenticate as a data engineer

1

Sign in as yourself

To sign in as yourself, use a persisted Cognite identity provider (CogIdP) session. Run:
Sign-in flow
The command opens a browser so you can sign in. It then asks which CDF project to use. Save the project and cluster to .env so the Cognite Toolkit selects them the next time you run a command.
2

Check your authentication

Check your authentication:
The command prints whether you are signed in, the identity provider, the project, and when the access token expires. It then lists each CDF project you can access, how many capabilities you have there, and which groups you belong to.--verbose prints every capability on the token. --show-missing adds a row for every Cognite Toolkit resource. Read and Write show the capabilities behind that access. No access means the token cannot read or write that resource type.
3

Sign out

To sign out, run:
This removes the persisted CogIdP session. Sign in again before the next Cognite Toolkit command that needs CDF.

Authenticate as a Cognite Toolkit administrator

Create the identity provider application and store its client ID and client secret before these steps. See Authentication and authorization.
1

Create the .env file

A Cognite Toolkit administrator uses credentials that a CI/CD pipeline can reuse. Run:
The wizard writes a .env file and checks that the credentials can reach CDF.
Init flow
The credentials are valid. means the Cognite Toolkit exchanged the client credentials for a token. The .env file contains the client secret. Do not commit it.
2

Create the Cognite Toolkit group

cdf auth verify does not create the identity provider application. It checks the CDF group that the service account should use, and can create or update that group.The group name is fixed: cognite_toolkit_service_principal. The service account should be a member of only that group, and the group should be able to manage the resources the Cognite Toolkit deploys.Run:
If the group does not exist, the wizard asks whether to create it and for the identity provider group ID (sourceId). If the group exists and is missing capabilities, the wizard lists the resources those capabilities unlock and asks whether to add them.
3

Update authorization

When a newer Cognite Toolkit version supports more resources, run cdf auth verify again. The command compares the group with the capabilities the current CLI expects:
Update authorization
Accept the prompt to add the missing capabilities to cognite_toolkit_service_principal. Deploy and clean can then manage the new resource types.

Next steps

Initialize a project with these credentials. See Initializing a Cognite Toolkit project. Build and deploy after the credentials can write the resources in your modules. See Building configurations.
Last modified on November 2, 2026