Skip to main content
Committed ⭐️
Mar 6, 2024 12:51 PM UTC
Solved

IAM Sessions (Python SDK)

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?

Dilini Fernando
Expert ⭐️⭐️⭐️⭐️
Mar 27, 2024 10:20 AM UTC

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
Expert ⭐️⭐️⭐️⭐️
Expert ⭐️⭐️⭐️⭐️
Mar 19, 2024 9:30 AM UTC

@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
Expert ⭐️⭐️⭐️⭐️
Expert ⭐️⭐️⭐️⭐️
Mar 27, 2024 10:20 AM UTC

Hi @Gabriel Neves Maciel ,

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