Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Initializes a new OAuthTokenCredential instance with the specified client id and secret and either an authorization code or a refresh token
Namespace:  Microsoft.TeamFoundation.Client
Assembly:  Microsoft.TeamFoundation.Client (in Microsoft.TeamFoundation.Client.dll)
Syntax
'Declaration
Public Sub New ( _
    authorizationUri As Uri, _
    clientId As String, _
    clientSecret As String, _
    authCodeOrRefreshToken As String _
)
public OAuthTokenCredential(
    Uri authorizationUri,
    string clientId,
    string clientSecret,
    string authCodeOrRefreshToken
)
public:
OAuthTokenCredential(
    Uri^ authorizationUri, 
    String^ clientId, 
    String^ clientSecret, 
    String^ authCodeOrRefreshToken
)
new : 
        authorizationUri:Uri * 
        clientId:string * 
        clientSecret:string * 
        authCodeOrRefreshToken:string -> OAuthTokenCredential
public function OAuthTokenCredential(
    authorizationUri : Uri, 
    clientId : String, 
    clientSecret : String, 
    authCodeOrRefreshToken : String
)
Parameters
- authorizationUri
 Type: System.Uri
- clientId 
 Type: System.String- The client id 
- clientSecret 
 Type: System.String- The client secret 
- authCodeOrRefreshToken 
 Type: System.String- Either an authorization code or a refresh token which can be used to obtain an access token (and a new refresh token) 
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.