Share via


SharePointOnlineCredentials.GetCredential method

Gets the network credentials with the specified URI and authentication type.

Namespace:  Microsoft.SharePoint.Client
Assembly:  Microsoft.SharePoint.Client.Runtime (in Microsoft.SharePoint.Client.Runtime.dll)

Syntax

'Declaration
Public Function GetCredential ( _
    uri As Uri, _
    authType As String _
) As NetworkCredential
'Usage
Dim instance As SharePointOnlineCredentials
Dim uri As Uri
Dim authType As String
Dim returnValue As NetworkCredential

returnValue = instance.GetCredential(uri, _
    authType)
public NetworkCredential GetCredential(
    Uri uri,
    string authType
)

Parameters

  • uri
    Type: System.Uri

    The URI that the credentials will be sent.

Return value

Type: System.Net.NetworkCredential
The method always return a null reference (Nothing in Visual Basic).

Implements

ICredentials.GetCredential(Uri, String)

See also

Reference

SharePointOnlineCredentials class

SharePointOnlineCredentials members

Microsoft.SharePoint.Client namespace