Skip to content
This repository has been archived by the owner on Jan 19, 2021. It is now read-only.

Use DefaultNetworkCredentials if the current credentials should be used #2076

Merged
merged 1 commit into from
Jul 29, 2019

Conversation

lafe
Copy link
Contributor

@lafe lafe commented May 9, 2019

Type

  • Bug Fix
  • New Feature
  • Sample

Related Issues?

This issue has been discovered while using PR #2068 in our Azure DevOps scripts for an on premises environment.

What is in this Pull Request ?

If a script is started with CurrentCredentials, the Credentials object of the context is empty. This causes an issue with REST based calls that construct their own HttpClient , as the UseDefaultCredentials flag on each instance of the HttpClient has to be set. As an alternative, the Credentials object can be set on the context to the CredentialCache.DefaultNetworkCredentials which is the same as using the UseDefaultCredentials flag.

@erwinvanhunen erwinvanhunen self-assigned this May 17, 2019
@erwinvanhunen
Copy link
Member

Good one, @lafe !

@erwinvanhunen erwinvanhunen merged commit ff9de6d into pnp:dev Jul 29, 2019
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