# Qlik Cloud connection issues

## Qlik Cloud authentication fails

Possible cause

The API key is invalid, expired, or the tenant URL is incorrect. The console displays `Qlik Cloud authentication failed for qlik-cli context`.

Proposed action

Do one of the following:

* Run `--setupQlikAuth` to re-enter credentials interactively.
* Provide credentials directly with `--qlikTenantUrl` and `--qlikApiKey`.

Verify the tenant URL format: `https://<tenant>.<region>.qlikcloud.com`. Check API key validity in the Qlik Cloud portal under Profile &gt; API keys. Run with `--logLevel DEBUG` to capture the full authentication exchange in the log file.

## Multiple qlik-cli contexts exist

Possible cause

More than one qlik-cli context is configured and no context was specified. The console displays `Multiple qlik-cli contexts exist but no context was specified`.

Proposed action

Specify the context explicitly with `--qlikContext` followed by the context name. To view available contexts, run `--setupQlikAuth` which lists all configured contexts.

## Cannot generate an API key

Possible cause

The user account does not have a role with the Manage API keys permission. The Qlik Cloud portal does not display the Generate new key option under Profile &gt; API keys.

Proposed action

Ask the tenant administrator to create a custom role with the Manage API keys permission and assign the role to the account. For details, see [Setting up Qlik Cloud access](https://help.qlik.com/en-US/migration/Content/Qv2qsMigration/getting-started/setting-up-qlik-cloud-access.htm).

## App creation fails with a permissions error

Possible cause

The user account does not have the Private Analytics Content Creator role. Qlik Cloud requires this role to create apps in the personal space.

Proposed action

Ask the tenant administrator to assign the Private Analytics Content Creator role to the account. When deploying to a shared space, verify that the Can edit permission exists on the target space. For details, see [Setting up Qlik Cloud access](https://help.qlik.com/en-US/migration/Content/Qv2qsMigration/getting-started/setting-up-qlik-cloud-access.htm).

## Learn more

* [Setting up Qlik Cloud access](https://help.qlik.com/en-US/migration/Content/Qv2qsMigration/getting-started/setting-up-qlik-cloud-access.htm)
* [Authentication](https://help.qlik.com/en-US/migration/Content/Qv2qsMigration/getting-started/authentication.htm)
* [Deploying to Qlik Cloud](https://help.qlik.com/en-US/migration/Content/Qv2qsMigration/deploying-to-qlik-cloud/index.htm)