CredentialManager.GetCredentials(Uri, Boolean) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Retrieves the user credential with the given site URL.
public System.Net.ICredentials GetCredentials (Uri siteUrl, bool disallowDefaultCredentials = false);
member this.GetCredentials : Uri * bool -> System.Net.ICredentials
Public Function GetCredentials (siteUrl As Uri, Optional disallowDefaultCredentials As Boolean = false) As ICredentials
Parameters
- siteUrl
- Uri
The URL to the SharePoint site.
- disallowDefaultCredentials
- Boolean
Indicates if DefaultCredentials is allowed to return if user has not provided the credential for the given site URL during the session.
Returns
The user credentials.