Skip to main content
New
Stack Overflow Jobs powered by Indeed: A job site that puts thousands of tech jobs at your fingertips (U.S. only). Search jobs

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
1 vote
0 answers
16 views

How to set scope in Auth provider for extending token expiry on JIRA server?

While setting up named credentials or Auth provider using OAuth2 for connecting to Jira on premise, The incoming link in JIRA is configured correctly and I am able to pull data but the session expires ...
goose's user avatar
  • 73
0 votes
0 answers
32 views

HMAC signing with Named Credentials and OAuth

Context I'm setting up an External Data Source pointing to an OData API. I've setup a Named Credential and an External Credential for it. The External Credential is configured to use OAuth2.0 (JWT ...
Jose Casimiro's user avatar
1 vote
0 answers
47 views

How to migrate successfully from legacy FCM APIs to HTTP v1 in apex?

I have a working functionality for sending push notifications via Firebase (FCM) from apex. But it is legacy now and I need to upgrade to HTTP v1. Based on the official documentation and the few ...
unique user's user avatar
1 vote
0 answers
44 views

OAuth 2.0 Client Credentials Flow: no client credentials user enabled but the user is authorized

this is my first question here. For starters, I've read all the other questions here, but I couldn't solve the problem. The thing is, I had been using the sandbox environment without any major ...
Verónica Isoardi's user avatar
0 votes
0 answers
48 views

Managed package - how to authorize access to orgs

We are attempting to connect one Salesforce org to multiple others (Production / Sandbox) using a web server login flow from a managed package. Our approach involves storing 'refresh_token' and '...
Hari Vignesh R's user avatar
0 votes
0 answers
30 views

Any limitations on creating an OAuth Connected App in Salesforce Essentials edition?

Are there any limitations to creating an OAuth connected app in Salesforce Essentials edition vs the higher editions like Professional, Enterprise, etc.? Are there any restrictions that I should be ...
tanfive7's user avatar
2 votes
1 answer
82 views

Safely Storing Client Credentials in Salesforce?

I'm trying to integrate with an external system using Authentication provider and Named credential. For this, I've created an Auth. provider with just Auth URL, Callback URL and a plugin class. Client ...
sfdcnewbie's user avatar
0 votes
0 answers
39 views

Calling APIs via oAuth and fine-grained authorization

I have an external system calling my middleware which then calls Salesforce to retrieve some data. Users login to the external system via an External IDP and retrieve an Access/Refresh Token and an ID ...
some guy's user avatar
  • 141
-1 votes
0 answers
35 views

OAuth2 Error 1800 there was a problem in setting up

I try to establish an OAuth2 connection between Boomi and Salesforce where the integration user on Salesforce side is assigned to "Salesforce API Only System integrations" profile with ...
Volker's user avatar
  • 9
-1 votes
0 answers
31 views

Error : We can’t log you in because of the following error. Remote_Error: The remote service returned an error

I have a strange case. I have a custom Auth Provider, trying to authorize the named credential and getting: Problem Logging In We can’t log you in because of the following error. For more information, ...
Pratik Patil's user avatar
0 votes
0 answers
30 views

OAuth2 connection inconsistency using JSforce

My Nodejs app has the option for users to sign-in using their devOrg. And my app is establishing an OAuth2 connection using authorization code grant. The whole sign in works perfectly fine. After the ...
Aslah P Hussain's user avatar
0 votes
0 answers
58 views

Help with auth. provider error: "Id_Token_Error: Missing id_token"

I am developing my own OpenIdConnect IdP for logging into my Salesforce. In Salesforce, I created two auth. providers. One is a custom auth. provider (and custom reg. handler), and the other is an ...
Jeff_S's user avatar
  • 53
0 votes
0 answers
33 views

Google Cloud Connection Works with Apex Auth Class but not with Named Credentials

I have hosted an API on google cloud run and the downloaded the service account credentials in below format. { "type": "service_account", "project_id": "...
aloomatar's user avatar
3 votes
1 answer
77 views

Getting REST API Token in Salesforce unsupported_grant_type

I want to invoke REST API of Salesforce (they are at: https://mySFDomain.my.salesforce.com/service/data/v57.0/composite - for example). On an Enterprise Edition org, I can access with request like: In ...
khoa_chung_89's user avatar
0 votes
0 answers
51 views

Is Salesforce's refresh token rotation working?

I have enabled the refresh token rotation for my connected app. My expectation is that when I use my refresh token to acquire a new access token, the current refresh token should expire and a new ...
user3161594's user avatar
2 votes
1 answer
487 views

404 URL No Longer Exists with REST API Call

When submitting a GET request with either Postman or boomi, I receive the following 404 error. ‘You have attempted to reach a URL that no longer exists on salesforce.com’ In either tool, I can get the ...
cmims's user avatar
  • 23
3 votes
2 answers
349 views

Getting the error : Unable to fetch the OAuth token when using an external credential with "Client Credentials with Client Secret Flow"

I am trying to make a webservice call to an authorization server (OAuth 2.0) using the "client_credentials" grant type, but i receive a "System.CalloutException: Unable to fetch the ...
user28829's user avatar
  • 696
0 votes
1 answer
84 views

Allow calls to most Salesforce APIs from Apex in Unlocked Package

This Apex code from an Unlocked Package HttpRequest request = new HttpRequest(); request.setHeader('Authorization', 'Bearer ' + UserInfo.getSessionId()); request.setHeader('Content-Type', '...
Robert Sösemann's user avatar
-1 votes
1 answer
111 views

How to create Auth Provider using APEX

I could see AuthProvider Object support Create() and Update(), But when i try to insert its throwing following error. DML operations are not allowing on Auth. Provider Code: AuthProvider authPro = ...
Ragul's user avatar
  • 521
0 votes
0 answers
57 views

Named Credential / External Credential Only Working Once

I've used a Named Credential with External Credential for the Client Credentials with Client Secret Flow. I didn't find the documentation very helpful to be honest, but this super post helped me get ...
Kash Hussain's user avatar
1 vote
2 answers
256 views

Set expiry time of OAuth access token at connected app level

I have seen a lot of stack exchange posts suggesting that the expiry time of the OAuth access token cannot be determined. It is dependent upon the session timeout policy set at user profile level and/...
tanfive7's user avatar
0 votes
1 answer
41 views

Should an Access Token be renewed for every call using JWT?

Using the OAuth 2.0 JWT Bearer Flow, when does the Access Token need to be renewed? Let's say the JWT Flow is used to send queries to Salesforce from time to time. Should one request a new Access ...
Z0q's user avatar
  • 59
3 votes
1 answer
152 views

External/Named Credential - acquiring access token from Mule via client credentials flow

I want to configure Named&External Credentials with oAuth client credentials flow and use it in apex. An endpoint is exposed by Mulesoft. I followed those very neat instructions shared here, but I ...
Ozobywatel's user avatar
0 votes
0 answers
49 views

Programatically give a user access to an ExternalCredential Principal (Per User)

I try to find a way to programatically give a user access to an ExternalCredential Principal (Per User). The standard way, is to go to personal settings and click "Allow Access". I found out ...
Elliot41's user avatar
0 votes
0 answers
81 views

Invalid Auth Header Using Run Flow In Another Org From UnofficialSf

When running the unlocked package Run Flow In Another Org I see a 400 Invalid_Auth_Header error in Debug Logs. Getting a successful response from Postman so I'm guessing something has changed in ...
ddeve's user avatar
  • 1,606
0 votes
1 answer
432 views

How to get Refresh Token in Postman in 2024?

I've been trying to get the refresh token using Postman without success. It seems from what I've found that some ways have changed over the years. I do have the request to get the access token, which ...
Z0q's user avatar
  • 59
0 votes
1 answer
54 views

Handling Encoded Responses in Salesforce OAuth2 External Credentials

I'm dealing with a specific issue in Salesforce related to External Credentials with OAuth2 protocol. The main problem is that Salesforce doesn't properly accept encoded responses from our ...
Damecek's user avatar
  • 1,938
-1 votes
1 answer
17 views

Making a web app that allows any salesforce org/user to sign up and see analytics

I'm creating a web application in which a user can "connect" their salesforce account to my web app and see analytics. I've currently looked at creating a connected app, but that only works ...
aaryan punia's user avatar
0 votes
0 answers
50 views

How to escape # in the redirect_uri for OAuth2?

I am redirecting user to salesforce for OAuth. It is giving me the error that unsupported response_type. When i debugged in the detail then i found that it is due to # in the url. How can i escape #? ...
Bhaskar Dabhi's user avatar
1 vote
1 answer
114 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
78 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
0 votes
0 answers
481 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
1 vote
0 answers
129 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
  • 286
0 votes
0 answers
208 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
853 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
377 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
133 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
69 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
48 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
583 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
329 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
114 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
604 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
0 answers
1k 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
488 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
13 votes
1 answer
4k 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) How ...
identigral's user avatar
  • 7,616
1 vote
1 answer
179 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
771 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
3 votes
1 answer
188 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
  • 31
0 votes
0 answers
84 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

1
2 3 4 5
18