Questions tagged [oauth2]

OAuth 2.0 is the next evolution of the OAuth protocol and is not backwards compatible with OAuth 1.0. OAuth 2.0 focuses on client developer simplicity while providing specific authorization flows for web applications, desktop applications, mobile phones, and living room devices.

Filter by
Sorted by
Tagged with
0 votes
1 answer
44 views

Web flow and access/refresh tokens via php

I'm trying to implement a web flow authentication process using php; so far, I've created the necessary index.php file which is used to get the first code: // Generate a random code verifier $...
Stratos Nikolaidis's user avatar
0 votes
0 answers
29 views

OAUTH_DISALLOWED_SCOPES error when authorizing named credential

I am trying to create a named credential to authorize access to the Salesforce metadata API, as explained in this blog: https://gscloudsolutions.com/tips-tricks/using-named-credentials-with-the-apex-...
Jelle van Geuns's user avatar
-1 votes
0 answers
32 views

OAuth 2.0 verification

does anyone have Oauth 2.0 documentation that can help me verify if I have configured my integration correctly thank you!
Anjalee's user avatar
-1 votes
0 answers
49 views

How to make a single connected app created in my dev org to autorize every salesforce user irrespective of the org to my node js application

I've a Node Application where it's functionality is to authorize users using their salesforce credentials and show 360 view of the account information For this I've created a connected app in ...
bnthsrikanth's user avatar
0 votes
0 answers
98 views

External Credentials not making oauth call

I am attempting to implement the Named Credential/External Credential system following this post and am getting "System.CalloutException: Unable to fetch the OAuth token." error. Everything ...
rgritt's user avatar
  • 1
0 votes
0 answers
50 views

External Credential Flow (Existing_link)

Struggeling to Authenticate to Microsoft AD With Open ID Connect using Named Credentials/External Credentials. First of all: This approach works on all Salesforce Instances, now I have this issue on a ...
TheShadow's user avatar
  • 276
0 votes
0 answers
59 views

Named Credential with Basic Authorization Token, Username and Password details

I am trying to callout to an external application APIs to fetch data into Salesforce. That external application has Auth token URL which will need below details to share Access token (bearer) to be ...
SFLearner's user avatar
1 vote
1 answer
167 views

Why is OAuth Client Credentials safer than OAuth Username-Password?

According to Salesforce, here "You can use the username-password flow to authorize a client via a connected app that already has the user’s credentials. However, we recommend avoiding this flow ...
Morgan Marchese's user avatar
0 votes
0 answers
143 views

PKCE: Invalid Code Verifier

I am trying to implement the PKCE flow into my SPA. I have read a bunch of documentation including the salesforce docs, the RFC for PKCE flow and have watched this step by step instruction from a ...
coderustle's user avatar
0 votes
0 answers
33 views

How to specify audience for OAuth token in SF when configuring auth for an Azure protected API endpoint hosting external data?

I have an external data source hosted in Azure which is an OData API endpoint. Everything works well with auth disabled. I created an application registration in Azure AD to represent the API and ...
Josh's user avatar
  • 101
0 votes
0 answers
35 views

Named Credential Auth 2.0 JWT Token giving empty error: "Unable to complete the JWT token exchange. Error: . Error description: ."

My JWT token is retrieved using only the following parameters in a json body: { "username":"blabla", "password":"blabla" } I don't need the standard JWT ...
Samuel Dias's user avatar
0 votes
0 answers
32 views

Newly gained Access Token from social login is resulting in This session is not valid for use with the REST API error for api requests

I am using Django-allauth for social logins. I confirmed that I have the access token that I receive from salesforce after the social login, but when I do headers = { "Content-Type": &...
Mango's user avatar
  • 1
1 vote
1 answer
188 views

Custom login with password for experience cloud sites

We have a few experience cloud sites in production. Right now, the login and register flows are passwordless, using the salesforce's native passwordless login and verification functionalities. Our ...
joacoiudica's user avatar
0 votes
0 answers
125 views

OAuth Client Credentials flow for external services - token expiration

I'm trying to connect to Marketo REST API via an external service leveraged in a flow, using the client credentials external credential and a named credential. Here is Marketo's doc on authentication ...
grantspants's user avatar
0 votes
0 answers
62 views

How to use CA Signed certificate in Salesforce Production Org for JWT Authentication in connected app?

We have a requirement to integrate CTI with Salesforce. We want to create a connected app using Digital Certificate. For the development orgs we used Open SSL (https://www.apexhours.com/salesforce-...
Shubham Athalye's user avatar
1 vote
0 answers
253 views

Salesforce Named Credentials - oauth token refresh does not work

I am using Named Credentials to make callouts to a sharepoint system. Initially, callouts from apex code work fine, until the token expires after 12 hrs. Then I am consistently receiving below error: ...
sfchimp's user avatar
  • 11
1 vote
1 answer
430 views

Getting error Remote_Error: The remote service returned an error when trying to authenticate named credential using a custom auth

I am trying to authenticate an external service while using a custom authenticator with client credentials, but when I click save I get the error "Remote_Error: The remote service returned an ...
peepoCode's user avatar
0 votes
1 answer
268 views

cg cloud modeler: user authentication failed

Consumer Goods Cloud Offline App gets an error: User authentication has failed (Code: U1000) This happens when trying to connect after being asked to log in.
Francisco Becerra's user avatar
7 votes
1 answer
2k views

External + Named Credential with oAuth client credentials flow

Given: a REST API that requires authorization. The authorization service attached to the API supports oAuth, one of the available oAuth flows is Client Credentials (grant_type=client_credentials) ...
identigral's user avatar
  • 7,255
1 vote
1 answer
117 views

External named Credential is not able to fetch in Apex code for Winter 24 Pre

Created the External Named credential with name Samsung Test Added the Principal Added the permission set However I am not able to fetch this named credential in Apex code. HttpRequest req = new ...
neha rai's user avatar
0 votes
0 answers
282 views

Oauth2.0 Authentication code generation from client id and secret in Apex code

I am not able to get the Authorisation code Oauth2.0 from Apex code, However i can get the same from Postman callout. Is it possible to get the authorisation code from apex? I am using the below ...
neha rai's user avatar
2 votes
1 answer
85 views

Do scratch orgs have weird behaviors with connected apps? Being given "Invalid_grant" with "user hasn't approved this consumer"

I have created a scratch org and installed a connected app to it. I've set the policy to "Admin Approved users are pre-authorized". I've given the connected app access to a permission set ...
Kiet T's user avatar
  • 21
0 votes
0 answers
57 views

OAuth Token Authentication Issue

Named Credentials is setup for "ABC" and same details we are storing in ABC_Metadata__mdt. Auth. Provider is setup for "ABC" and same details we are storing in ...
Nilesh's user avatar
  • 1
2 votes
1 answer
264 views

Callout via Named Credentials with client credentials oAuth flow

I'm trying to set up an external service that will rely on REST API calls from Salesforce to Marketo, which relies on client credentials OAuth 2.0 to authenticate. To authenticate with the Marketo API,...
grantspants's user avatar
2 votes
1 answer
196 views

How Do I Use OAuth2.0 With JWT To Connect To Salesforce?

So I'm trying to get a proof-of-concept together so I can ask my employer for access to our Salesforce (I'm a new employee and very low on the food chain, but their current workflow is just STUPID). I'...
jesse's user avatar
  • 121
0 votes
1 answer
28 views

Best way for server-to-server auth to Salesforce to be able to then query as specific user

I am trying to authenticate to Salesforce from 3rd party service (custom java app). Users in the 3rd party app should be able to search records in salesforce (query rest api call) and create new ...
Damian's user avatar
  • 1
0 votes
0 answers
71 views

Problem connecting to the salesforce authentication service when trying to authorize an org

Problem connecting to the salesforce authentication service when trying to authorize an org. Getting below error: Could not retrieve the username after successful auth code exchange. Due to: request ...
Gargi Gupta's user avatar
0 votes
0 answers
104 views

Login Rate Exceeded - external service calls Salesforce using client_credentials

Introduction: We have an external Java service that communicates with Salesforce instance. There is a connection using OAuth2.0 client_credentials. For this purpose we have created connected app. Use ...
mwhere's user avatar
  • 1
0 votes
1 answer
285 views

UserInfo: protecting access token (GET vs POST)

I've noticed when using the official Postman collection, the parameters for any methods have to be put as parameters in the URL, otherwise the status code received is 400. I've tried debugging it, so ...
dbase1's user avatar
  • 186
0 votes
0 answers
112 views

Get Refresh Token after callout failure

Named Credentials is setup for "ABC" and same details we are storing in ABC_Metadata__c. We are storing Refresh Token and Access Token in one record custom object Token__c. We have one ...
Nilesh's user avatar
  • 1
0 votes
0 answers
43 views

Authenticating inbound and outbound requests for an external service

I am developing a service that uses a connected app to implement an OAuth flow for Salesforce users. I can store access and refresh tokens and use them to make requests into the orgs of the users who ...
Brandon DeMatteis's user avatar
0 votes
0 answers
63 views

How can I run apex code on user login to a digital experience site?

Is it possible to run apex code on a user login to a digital experience site? Without using a loginflow (using Apex Action in Login flow). I do not want a user to see the loginflow interface before ...
Shaun van Huyssteen's user avatar
0 votes
0 answers
32 views

Access control based on a connected app

I would like to redirect incoming oauth token requests from a certain connected app, to perform additional access control for that specific app before granting it the access token, or at least before ...
wall-e's user avatar
  • 11
0 votes
0 answers
34 views

Couldn't authenticate third party Api from external credentials

I am trying access Xero API from Salesforce. For authentication I created an app in Xero and used id and secret key to create openid auth. provider in Salesforce. I used that Authentication provider ...
lokesh manikanta's user avatar
0 votes
1 answer
363 views

Started getting invalid_grant "authentication failure"

I had built and started running an integration, which was working fine for a while... Then it started erroring all of a sudden with: { "error": "invalid_grant", "...
Ian Vaughan's user avatar
0 votes
1 answer
312 views

The requested URL "[no URL]" from Experience Authorize endpoint

I have attempted to use headless identity APIs as per https://help.salesforce.com/s/articleView?id=sf.remoteaccess_authcodecreds_singlepageapp.htm&type=5 I have created the Connected app and ...
Jonathan Fox's user avatar
0 votes
1 answer
201 views

How to use Web Server 2.0 OAuth flow with new "Salesforce API Only System Integrations" profile user

I am using recently announced Salesforce Integration license user for an integration using Web Server 2.0. As per the Web Server 2.0 flow, I need to first obtain the Authorization Code. To get the ...
user36778's user avatar
  • 634
0 votes
0 answers
84 views

Any way to bulk revoke oauth tokens

So I have an app that is managing several oauth access/refresh tokens and it would be great if I revoke all the tokens I have. I am aware of the Salesforce's revoke endpoint. But it seems I can only ...
CodeBaker's user avatar
  • 301
1 vote
1 answer
250 views

Retrieve claims from a jwt with apex

I'm trying to retrieve the claims, audience, issuer, subject from a JWT in apex, according to this documentation: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/...
2095377's user avatar
  • 58
3 votes
3 answers
152 views

Connected App JWT flow fails for custom profile

Our managed package requires a connected app with JWT flow to be configured by the SF admin. The admin chooses the “Admin approved users are pre-authorized” option, creates a custom permission set, ...
ApexAdam's user avatar
  • 163
0 votes
1 answer
276 views

OAuth 2.0 Web Server Flow Without 2nd redirect

As an ISV partner I am building a web app to communicate between websites and salesforce. Essentially a many to many relationship where this connected app connects the website to a salesforce instance....
TemporaryFix's user avatar
  • 2,897
-2 votes
1 answer
69 views

If you refresh a Salesforce oganization, what happens to OAuth credentials and refresh token?

I refreshed my Salesforce sandbox and my OAuth credentials (refresh token) doesn't work anymore. Is that expected?
databasechaser's user avatar
0 votes
0 answers
382 views

Named Credential is not automatically refreshing the token

I am using a Tooling API credential to authenticate against the same Salesforce org so that I can get some tooling API data in Apex. I am using oauth 2 and initially my integration user has to go ...
Strong Like Bull's user avatar
2 votes
1 answer
341 views

Authenticate to Salesforce in Chrome extension

crosspost from SO I am trying to authenticate to Salesforce in Chrome extension, but I am getting 400 error. If I try this code in Express.js server, it works. background.js console.log("...
Matt's user avatar
  • 73
1 vote
0 answers
29 views

How to propagate a text value to SF managed package subscribers?

We have a 2G Managed Package which needs to be integrated with an external system via OAuth 2.0 flow to push/pull data from. In other words, SF managed package is supposed to pull data from and push ...
Evgenii Orekhov's user avatar
0 votes
0 answers
120 views

Is it possible to set up a Microsoft Auth. Provider without a Callback URL?

I'm writing a feature that uses an API implemented on top of the Microsoft/Azure stack. To access the service, I'm first required to fetch an OAuth2.0 token. URL to get the token: https://login....
Przemysław Długoszewski-Tamoń's user avatar
0 votes
0 answers
89 views

How to get Salesforce to support Elliptic Curve Signatures (ECDSA) signatures?

In my production org, when going to the URL xxx.my.salesforce.com/id/keys, I noticed that all the keys (4 keys in total) are "alg": "RS256". I am trying to integrate Salesforce (...
compski's user avatar
  • 1,251
-1 votes
1 answer
269 views

How can I add a scope to a connected app for a given user?

I am new to Salesforce. I am admin of the Salesforce at my company. We've hired an outside company to do some integration with us, via Oauth and a connected app. They tell me that they need the "...
JeffGallant's user avatar
0 votes
0 answers
130 views

invalid_grant: user hasn't approved this consumer

(Note: I see several similar questions here, but I believe I've tried all the suggested answers.) I'm doing JWT authentication with a Salesforce app, for a single user. It worked until our test ...
JW.'s user avatar
  • 101
0 votes
0 answers
320 views

C# SOAP API Connection to Salesforce using OAuth2.0

Currently working to build a data sync app for an Enterprise WSDL Salesforce Sandbox. I am able to use the simple SforceService Login with UserName, Password + Token but I am trying to connect using ...
C. Singleton's user avatar

1
2 3 4 5
17