Share via


CredentialManager.GetCredentials Method

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Retrieves the user credential with the given site url.

Namespace:  Microsoft.VisualStudio.SharePoint.Remote.Authentication
Assembly:  Microsoft.VisualStudio.SharePoint.Remote (in Microsoft.VisualStudio.SharePoint.Remote.dll)

Syntax

'Declaration
Public Function GetCredentials ( _
    siteUrl As Uri, _
    disallowDefaultCredentials As Boolean _
) As ICredentials
public ICredentials GetCredentials(
    Uri siteUrl,
    bool disallowDefaultCredentials
)

Parameters

  • siteUrl
    Type: System.Uri

    The url to the SharePoint site.

  • disallowDefaultCredentials
    Type: System.Boolean

    Indicates if DefaultCredentials is allowed to return if user has not provided the credential for the given site url during the session.

Return Value

Type: System.Net.ICredentials
The user credentials.

.NET Framework Security

See Also

Reference

CredentialManager Class

Microsoft.VisualStudio.SharePoint.Remote.Authentication Namespace