Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Demonstration code fails authentication - The provided request must include a 'client_secret' input parameter #1123

Open
JeffreyEnglish opened this issue Feb 24, 2025 · 0 comments
Labels
status:waiting-for-triage An issue that is yet to be reviewed or assigned type:bug A broken experience

Comments

@JeffreyEnglish
Copy link

Describe the bug

I am trying to run the sample code from the README.

import asyncio
from azure.identity import InteractiveBrowserCredential
from msgraph import GraphServiceClient

credential = InteractiveBrowserCredential(
    client_id="c4368f6a-49b2-4219-8a57-76249566c5fd",
    tenant_id="consumers",
)
scopes = ["User.Read"]
client = GraphServiceClient(credentials=credential, scopes=scopes,)

# GET /me
async def me():
    me = await client.me.get()
    if me:
        print(me.display_name)
asyncio.run(me())

After logging in in the browser, get the error message:

azure.core.exceptions.ClientAuthenticationError: Authentication failed: AADSTS70002: The provided request must include a 'client_secret' input parameter. Trace ID: 503dcd2c-650c-4577-b1e7-2ce1a5cb1e01 Correlation ID: 5b1f4951-27ce-4edc-8f9a-81fe695002d8 Timestamp: 2025-02-24 22:39:43Z

Content: {"error":"invalid_client","error_description":"AADSTS70002: The provided request must include a 'client_secret' input parameter. Trace ID: 503dcd2c-650c-4577-b1e7-2ce1a5cb1e01 Correlation ID: 5b1f4951-27ce-4edc-8f9a-81fe695002d8 Timestamp: 2025-02-24 22:39:43Z","error_codes":[70002],"timestamp":"2025-02-24 22:39:43Z","trace_id":"503dcd2c-650c-4577-b1e7-2ce1a5cb1e01","correlation_id":"5b1f4951-27ce-4edc-8f9a-81fe695002d8","error_uri":"https://login.microsoftonline.com/error?code=70002"}

Expected behavior

I expect that after logging in the code will print my display name

How to reproduce

Run the code provided above

SDK Version

1.21.0

Latest version known to work for scenario above?

No response

Known Workarounds

No response

Debug output

Click to expand log ```
</details>


### Configuration

_No response_

### Other information

_No response_
@JeffreyEnglish JeffreyEnglish added status:waiting-for-triage An issue that is yet to be reviewed or assigned type:bug A broken experience labels Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:waiting-for-triage An issue that is yet to be reviewed or assigned type:bug A broken experience
Projects
None yet
Development

No branches or pull requests

1 participant