Skip to main content
Seasoned ⭐️⭐️
February 2, 2023
Solved

Error - Authentication via Client Secret in Training

  • February 2, 2023
  • 11 replies
  • 222 views

Course name - Learn to Use the Cognite Python SDK
 

File name - 1_Authentication.ipynb

Giving error - CogniteAuthError: Error generating access token: invalid_client, 401, AADSTS7000215: Invalid client secret provided. Ensure the secret being sent in the request is the client secret value, not the client secret ID, for a secret added to app 'fab52bb5-9de2-4f9e-aefa-712da4b5fe00'. Trace ID: f02d8b23-9bee-47ae-8cae-880d1db31100 Correlation ID: 4ea3847d-20ef-4548-be07-9ffb86f58451 Timestamp: 2023-02-02 10:58:52Z

Can someone help me resolve the same .

    Best answer by Sofie Haug

    Hi again @vidhi.c.jain! You’re not given an client secret for this course. 
    Notebook 1 shows different methods of authenticating and states that to use client secret “Make Sure, You've created an environment variable CLIENT_SECRET with the value of the client secret obtained from admin”

    So basically the code is there to show it’s down if you wanted to authenticate using a client secret, but it not asking you to do it. Going forward with notebook 2 it is not needed. 

    I hope that answered you question and that you have a smooth experience with the rest of the course.

     

    Sofie

    11 replies

    Sofie Haug
    Expert ⭐️⭐️⭐️⭐️
    Cognite Academy Instructor
    February 6, 2023

    I agree with @Carin Meems! I think @vidhi.c.jain  you need to check the clock on your computer, maybe it is just off with 1 minute?

    I found a lot of similar issues on the internet (for example here: https://github.com/Azure/azure-cli/issues/20388)
    where one person says: 
     

    For the record, I was also facing this issue, even after synchronizing my machine's time. Only after an additional reboot the problem went away.

     

    Could you try that @vidhi.c.jain ?

    Sofie | Cognite Academy