Expand my Community achievements bar.

SOLVED

aio not working Error: [CloudManagerCLI:IMS_CONTEXT_MISSING_FIELDS

Avatar

Level 9

I followed this article to the letter:

 

https://medium.com/adobetech/setting-up-adobe-i-o-cli-for-cloud-manager-8820f47e3c94

 

including the following steps:

 

 aio-cli % aio config:set jwt-auth config.json --file --json

 aio-cli % aio config:set jwt-auth.jwt_private_key config/private.key --file 

  aio config:set cloudmanager_programid 12345

 

all of the above commands worked fine, where the json file has the client ID, secret and jwt token taken from the adobe integrations api page, and the prite key was downloaded from the "config.zip" you get when you create a new api project.

 

The error message is as follows:

 

% aio cloudmanager:list-environments

    Error: [CloudManagerCLI:IMS_CONTEXT_MISSING_FIELDS] One or more of the required fields in 

    ims.contexts.aio-cli-plugin-cloudmanager were not set. Missing keys were private_key.

    Code: IMS_CONTEXT_MISSING_FIELDS

 

Any ideas how to fix?

 

frustratingly, there are a differnt set of instructions here https://github.com/adobe/aio-cli-plugin-cloudmanager#service-account-authentication

 

This has a different format of json file, which doesnt take a jwt token, but instead requires a 

technical_account_id" and ims_org_id.

 

However, when using this config.json file, and its correspondingly different config commands, i get different error message:

 

 % aio cloudmanager:list-environments                                                

    Error: 400 (Bad Request)

 

Does anyone have a working set of instructions on how to setup aio in order to set an environment variable with cloud AEM?

 

The reason I need to use list-environments is I dont know how to find the environment IDs in order to set env vars.

 

we also tried 

aio auth:login   

 

but this doesnt work either. It allows you to login, then gives this message:

 

You are currently in:

1. Org: <no org selected>

2. Project: <no project selected>

3. Workspace: <no workspace selected>

 

however, when we try to list environments, we get the same error:

% aio cloudmanager:list-environments

    Error: 400 (Bad Request)

 

 

 

 

1 Accepted Solution

Avatar

Correct answer by
Level 2

I had this issue and resolved it by authenticating first. Try this command to login:

aio auth:login

Then, you should be able to list orgs with this:

aio cloudmanager:org:list

 Next, you need to select an org to work with:

aio cloudmanager:org:select

Now you should be able to list environments, program IDs, etc.

Cheers!

View solution in original post

3 Replies

Avatar

Correct answer by
Level 2

I had this issue and resolved it by authenticating first. Try this command to login:

aio auth:login

Then, you should be able to list orgs with this:

aio cloudmanager:org:list

 Next, you need to select an org to work with:

aio cloudmanager:org:select

Now you should be able to list environments, program IDs, etc.

Cheers!