Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Update example#129

Merged
baywet merged 2 commits intomicrosoftgraph:mainfrom
srtippan:patch-1
Jul 11, 2023
Merged

Update example#129
baywet merged 2 commits intomicrosoftgraph:mainfrom
srtippan:patch-1

Conversation

@srtippan
Copy link
Copy Markdown
Contributor

@srtippan srtippan commented Jul 11, 2023

Updated README example, since the given example does not work.

Scope update to use 'https://graph.microsoft.com/.default' rather than 'User.Read' as we get the following error

OAuth2::Error (invalid_scope: AADSTS1002012: The provided value for scope User.Read is not valid. Client credential flows must have ) scope value with /.default suffixed to the resource identifier (application ID URI).
Trace ID: 44e61acd-c6b7-483f-b3bc-9a6164cc3e00
Correlation ID: 11c0af7b-eb8d-4555-9fdc-2002a11730b4
Timestamp: 2023-07-11 17:05:18Z
{"error":"invalid_scope","error_description":"AADSTS1002012: The provided value for scope User.Read is not valid. Client credential flows must have a scope value with /.default suffixed to the resource identifier (application ID URI).\r\nTrace ID: 44e61acd-c6b7-483f-b3bc-9a6164cc3e00\r\nCorrelation ID: 11c0af7b-eb8d-4555-9fdc-2002a11730b4\r\nTimestamp: 2023-07-11 17:05:18Z","error_codes":[1002012],"timestamp":"2023-07-11 17:05:18Z","trace_id":"44e61acd-c6b7-483f-b3bc-9a6164cc3e00","correlation_id":"11c0af7b-eb8d-4555-9fdc-2002a11730b4"}

Update example to query users by id, since the client-credentials cannot get user specific data.

MicrosoftGraph::Models::ODataErrors::ODataError (MicrosoftGraph::Models::ODataErrors::ODataError)

Updated README example
@srtippan srtippan requested a review from a team as a code owner July 11, 2023 16:52
Copy link
Copy Markdown
Member

@baywet baywet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution, here is a quick comment

Comment thread README.md Outdated
Copy link
Copy Markdown
Member

@baywet baywet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution!

@baywet baywet enabled auto-merge July 11, 2023 17:56
@baywet baywet merged commit 096e5e3 into microsoftgraph:main Jul 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants