Skip to main content
Answer

IAM Sessions (Python SDK)

  • March 6, 2024
  • 2 replies
  • 59 views

Forum|alt.badge.img+3

I need some help with the SDK (Python). I'm trying to list active sessions in Cognite using the following resource:

 

client.iam.sessions.list(status="ACTIVE"

 

However, I notice that even my client_id doesn't return in the listing (I'm logged in via browser with my user).

 

Am I misunderstanding this feature?

Best answer by Dilini Fernando

Hi @Gabriel Neves Maciel ,

I hope the information above was helpful! Let me know if there's anything else I can do for you.

2 replies

Mithila Jayalath
Seasoned Practitioner
Forum|alt.badge.img+8

@Gabriel Neves Maciel  please refer to the documentation here. The client-id will be only returned if the session was created using client credentials. In your case you have used user credentials.

 


Dilini Fernando
Seasoned Practitioner
Forum|alt.badge.img+2
  • Seasoned Practitioner
  • Answer
  • March 27, 2024

Hi @Gabriel Neves Maciel ,

I hope the information above was helpful! Let me know if there's anything else I can do for you.