You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 35846a5
Browse filesBrowse the repository at this point in the historyBrowse files
If you need the raw token response first (e.g. to inspect or persist it), use [`AuthenticationClient.UsernamePasswordAsync`](xref:NetCoreForce.Client.AuthenticationClient.UsernamePasswordAsync(System.String,System.String,System.String,System.String,System.String)) and build the client from the result:
A synchronous [`UsernamePassword`](xref:NetCoreForce.Client.AuthenticationClient.UsernamePassword(System.String,System.String,System.String,System.String,System.String)) overload is also available if you can't use `async`/`await`.
44
-
45
-
> [!NOTE]
46
-
> This flow does not return a refresh token — see [Refreshing an Access Token](#refreshing-an-access-token) below.
47
-
48
-
---
49
-
50
12
## Client Credentials Flow
51
13
52
14
Server-to-server authentication with no end user involved, using only the connected app's Consumer Key/Secret.
> The OAuth Username-Password flow is deprecated and Salesforce recommends against using it. It is blocked by default in orgs created in Summer '23 or later, and admins can disable it in any org (Setup > OAuth and OpenID Connect Settings > *Allow OAuth Username-Password Flows*), so it may not be available in your org. For new integrations, use the [Client Credentials Flow](#client-credentials-flow) for server-to-server access, or the [Web Server Flow](#web-server-authorization-code-flow) when a user logs in.
143
+
144
+
The application holds the user's credentials directly and exchanges them for an access token.
145
+
146
+
One-step, via the [`ForceClient(AuthInfo)`](xref:NetCoreForce.Client.ForceClient.%23ctor(NetCoreForce.Client.Models.AuthInfo)) constructor:
If you need the raw token response first (e.g. to inspect or persist it), use [`AuthenticationClient.UsernamePasswordAsync`](xref:NetCoreForce.Client.AuthenticationClient.UsernamePasswordAsync(System.String,System.String,System.String,System.String,System.String)) and build the client from the result:
A synchronous [`UsernamePassword`](xref:NetCoreForce.Client.AuthenticationClient.UsernamePassword(System.String,System.String,System.String,System.String,System.String)) overload is also available if you can't use `async`/`await`.
174
+
175
+
> [!NOTE]
176
+
> This flow does not return a refresh token — see [Refreshing an Access Token](#refreshing-an-access-token).
0 commit comments