Available Credentials
The Available Credentials view
The Available Credentials view is part of the Posit Workbench extension sidebar. It displays custom OAuth integrations that your administrator configured and lets you manage authentication directly from the IDE.
To open the view, click the Posit Workbench Extension tab in the Activity Bar.
Each integration in the tree shows its current authentication status:
| Status | Icon | Description |
|---|---|---|
| Authenticated | You have signed in to this integration and it is ready to use. The description shows the Integration ID. | |
| Not signed in | The integration requires authentication before use. | |
| Configuration error | The integration has a configuration problem. Point to the integration to see error details in the tooltip. |
The Available Credentials view automatically refreshes every 30 seconds when visible, and pauses when you hide the view to reduce resource usage. To manually refresh, click the Refresh button in the view toolbar.
Signing in
- In the Available Credentials view, locate the integration you want to authenticate with.
- Click the Sign In button next to the integration, or right-click and select Sign In.
A browser window opens to complete the OAuth authorization flow with the provider. After successful authentication, the integration status updates to show the key icon.
Signing out
- Right-click an authenticated integration.
- Select Sign Out.
The integration status updates to show the lock icon, indicating you are no longer signed in.
Viewing integration details
Expand any integration in the tree to view its configuration details:
The view shows the following details:
- Integration ID (Globally Unique Identifier (GUID)): the unique identifier needed for programmatic access
- Issuer: the OAuth provider URL
- Client ID: the OAuth client identifier
- Scopes: the permissions granted to this integration
- Auth URL: the OAuth authorization endpoint
- Token URL: the OAuth token endpoint
To copy any detail value, point to it and click the Copy Value icon that appears on the right.
Generating code snippets
The Available Credentials view can generate ready-to-use Python or R code for retrieving OAuth credentials. This is a quick way to get started with the posit-sdk (Python) or rstudioapi (R) packages.
Copying a snippet
- Right-click an authenticated integration.
- Select Copy Python Snippet or Copy R Snippet.
The snippet is copied to your clipboard, ready to paste into your editor.
Viewing a snippet
- Right-click an authenticated integration.
- Select View Python Snippet or View R Snippet.
A read-only editor tab opens with the generated code, with syntax highlighting. From there you can review the code before copying it.
The callouts in the image above correspond to the following actions in the snippet view:
- Copy the snippet code by clicking the Copy to Clipboard icon in the editor toolbar.
- Copy the snippet code by clicking the Copy to Clipboard code lens above the first line of code.
Generated snippet examples
The generated snippets use the integration’s GUID to retrieve credentials:
from posit.workbench import Client
client = Client()
credentials = client.oauth.get_credentials(audience="{integration_id}")
if credentials:
access_token = credentials["access_token"]
# Use access_token with your API requestscredentials <- rstudioapi::getOAuthCredentials(audience = "{integration_id}")
if (!is.null(credentials)) {
access_token <- credentials$access_token
# Use access_token with your API requests
}For more details on using these SDKs, including token refresh, error handling, and finding integrations programmatically, see Custom OAuth Integrations: Using credentials in sessions.
Command palette commands
The following commands are available from the command palette (Ctrl+Shift+P / Cmd+Shift+P) under the Posit Workbench category:
| Command | Description |
|---|---|
| Refresh Available Credentials | Manually refresh the credentials list. |
| View Credential Code Snippet | Open a read-only editor tab with the generated code snippet for the selected integration. |
| Copy Credential Code Snippet | Copy the generated code snippet for the selected integration to the clipboard. |




