Solved

Can't list assets in postman using OIDC

  • 4 December 2022
  • 3 replies
  • 107 views

I have got postman connected to the publicdata project using the details below:

Environment

Auth token:

I sign in with the credentials I used to sign up in the Cognite Academy, which I understand means they are added to the Azure AD for the publicdata project.

I can access some of the api endpoints via Postman so the authentication is working but I get a 403 unauthorised when I try to list all Assets. Am I meant to be able to see the assets in Postman with this setup?

 

Thanks in advance,

 

Andy

icon

Best answer by Dilesha Kodithuwakku 5 December 2022, 13:28

View original

3 replies

Badge +1

Hi Andy,

This is Vivek.

I was able to list all the assets. So I would like you to follow some steps, and I think you will be able to list all the assets.

1. In Postman, below the authentication tab in the scope section, instead of using this https://{{cluster}}.cognitedata.com/.default please use this {{baseURL}}/.default.

2. and click the "create new access token" button, and a pop-up box will appear; click "proceed," and you will see a button saying "use this token"; click that.

3. and save, and the problem will be resolved.

Try these steps and get back to me.

For further clarification, I have attached some screen shots below.

I look forward to hearing from you.

Best regards,

Vivek.

 

Userlevel 1
Badge +1

Hi Andy,

This is Dilesha. 

I have checked your capabilities and you have the capability to list assets. Sometimes this can happen when your token is expired. Could you please re generate the token and try to lists assets again?

Hi Vivek,

 

Thanks for your response. I have replaced the scope entry amd am able to get a list of time series but still get an unauthorised error for listing assets.

Any other ideas?

Andy

 

 

 

Reply