Skip to content

Added Consistency Level as required for some calls #62

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

Merged
merged 2 commits into from
Jan 26, 2021

Conversation

levensailor
Copy link
Contributor

ConsistencyLevel | eventual. This header and $count are required when using $search, or when using $filter with the $orderby query parameter. It uses an index that may not be up-to-date with recent changes to the object.

Added this to Authorization Middleware as I found appropriate

@@ -12,7 +12,7 @@ def __init__(self, credential: TokenCredential, scopes: [str]):
self.retry_count = 0

def send(self, request, **kwargs):
request.headers.update({'Authorization': 'Bearer {}'.format(self._get_access_token())})
request.headers.update({'Authorization': 'Bearer {}'.format(self._get_access_token()), 'ConsistencyLevel': "eventual"})
Copy link
Contributor

@jobala jobala Jan 26, 2021

Choose a reason for hiding this comment

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

nit: use single quotes.

@jobala jobala merged commit 7da8aab into microsoftgraph:dev Jan 26, 2021
@MIchaelMainer
Copy link
Contributor

This added the ConsistencyLevel header for all calls which is incorrect. This should not be added via the authorization middleware. It should be added on a per call basis.

#61

@jobala
Copy link
Contributor

jobala commented Jan 27, 2021

Thanks @MIchaelMainer reverting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants