msgraph-sdk-python-core icon indicating copy to clipboard operation
msgraph-sdk-python-core copied to clipboard

Authentication issue

Open balakreshnan opened this issue 3 years ago • 5 comments

Describe the bug DeviceCodeCredential.get_token failed: Authentication failed: AADSTS7000218: The request body must contain the following parameter: 'client_assertion' or 'client_secret'. Trace ID: 22c04acd-a816-42bc-bb4f-5f1c8dcb4c02 Correlation ID: 3c90998d-702c-4bd9-9ae3-02eeb373883b Timestamp: 2022-12-01 19:02:02Z Content: {"error":"invalid_client","error_description":"AADSTS7000218: The request body must contain the following parameter: 'client_assertion' or 'client_secret'.\r\nTrace ID: 22c04acd-a816-42bc-bb4f-5f1c8dcb4c02\r\nCorrelation ID: 3c90998d-702c-4bd9-9ae3-02eeb373883b\r\nTimestamp: 2022-12-01 19:02:02Z","error_codes":[7000218],"timestamp":"2022-12-01 19:02:02Z","trace_id":"22c04acd-a816-42bc-bb4f-5f1c8dcb4c02","correlation_id":"3c90998d-702c-4bd9-9ae3-02eeb373883b","error_uri":"https://login.microsoftonline.com/error?code=7000218","claims":"{"access_token":{"capolids":{"essential":true,"values":["01e95e51-d161-4922-8776-747a86759589","a5f338a6-266a-4dea-83e7-cd58e84f8929"]}}}"}

graphUserScopes = [ "User.Read"] device_code_credential = DeviceCodeCredential(client_id, tenant_id = tenant_id) user_client = GraphClient(credential=device_code_credential, scopes=graphUserScopes) result = user_client.get('/me') print(result.json())

image

balakreshnan avatar Dec 01 '22 19:12 balakreshnan

sorry i need to pass another parameter

balakreshnan avatar Dec 01 '22 19:12 balakreshnan

The above error is happening and i installed all the latest software today. using python 3.8 with Azure ML using AML jupyter

balakreshnan avatar Dec 01 '22 19:12 balakreshnan

Hi @balakreshnan. Thanks for reporting this issue. We are looking into it and will provide an update.

samwelkanda avatar Dec 02 '22 04:12 samwelkanda

I am having the same error. Was there an update to this issue?

n-masc avatar Dec 14 '22 01:12 n-masc

See https://github.com/telstrapurple/MSTeamsChatExporter/issues/4 for a solution. It would be helpful if Microsoft documented this. Or even better, if the error message actually made sense.

zdevaty avatar Oct 30 '23 17:10 zdevaty

thanks for reporting this issue, we have since released a new version of the SDK which this issue doesn't apply to. We encourage you to migrate to the new version and open a new issue if you still need help

baywet avatar Apr 25 '24 15:04 baywet