Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

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
19 views

If I change a Connected App's OAuth Scopes, do users need to re-authorize so that the connected app now has those Scopes available?

I have created a Connected App in "Org A" which users are self-authorizing in another org, "Org B". If I add a new OAuth scope to the Connected App in "Org A", will the ...
user avatar
  • 125
0 votes
0 answers
29 views

How to debug Named Credential Refresh Token Issue

I am implementing an integration with a third party that uses OAuth 2. I am using a 'Named Principal' Named Credential with an Open ID Connect Auth Provider. It works fine to authenticate and make ...
user avatar
  • 10.9k
1 vote
0 answers
40 views

How can I authorize an Apex app to make callouts to Google Calendar for a specific Salesforce user?

Goal I am writing some Apex code, which a Salesforce user can authorize to access their Google Calendar. This Apex code then retrieves information from that user's Google calendar and performs some ...
user avatar
  • 11
1 vote
1 answer
30 views

Can I obtain refresh token with user-agent-flow?

From the documentation I understand that the answer is yes: https://help.salesforce.com/s/articleView?id=sf.remoteaccess_oauth_user_agent_flow.htm&type=5 But if I try I can't get it. I am working ...
user avatar
0 votes
1 answer
49 views

OAuth 2.0 Web Server Flow and CORS problem

I try to communicate with the API Salesforce. First, I call the URL: https://login.salesforce.com/services/oauth2/authorize. It gives me a code in the callback URL I gave on parameters. Then, I try to ...
user avatar
  • 3,518
-3 votes
1 answer
37 views

Consuming salesforce Rest API with out security token [closed]

I am exposing a API in salesforce which will be hit by an external c# application. I am enabled oAuth mechanism. Things are looking good but when the external end point needs to pass user id and ...
user avatar
  • 59
0 votes
0 answers
27 views

Web app and two Salesforce orgs working as IDP and SP

Currently we have two Salesforce orgs, one of them is IDP, and second SP. Community Users login to Org 1 and use community resources on Org 2. Now we would like to create external WebApp. Between Web ...
user avatar
  • 335
0 votes
0 answers
50 views

Named Credentials JWT created with invalid signature using Microsoft as Auth Provider

We need to make an authenticated call to an external endpoint with Named Credentials created on Salesforce using a Microsoft account with Oauth 2.0. To do that, we created an Azure project in order to ...
user avatar
1 vote
1 answer
33 views

Single Sign on and API token grant

I am new to Single Sign on configuration on Salesforce and have a use case which I was hoping the community can advise upon. We have a web app outside of Salesforce. We are currently in the process of ...
user avatar
1 vote
0 answers
22 views

Oauth KickoffUrls empty in OpenId AuthProviders

I am creating an AuthProvider for an external API using Apex and SOAP API private void createAuthProvider() { createSObject( '<urn1:type>AuthProvider</urn1:type>' + '&...
user avatar
0 votes
1 answer
24 views

Why is Salesforce asking more permissions than the ones listed in the connected app?

We created a new Connected App in Salesforce with appropriate scopes to allow users of our service to oAuth with Salesforce. However, today I noticed that when logging in the user is asked by ...
user avatar
1 vote
0 answers
138 views

Access Rest API from Google Apps Script

I am using Google Scripts to connect to Salesforce REST API. I am using the library 1B7FSrk5Zi6L1rSxxTDgDEUsPzlukDsi4KGuTMorsTQHhGBzBkMun4iDF function getService() { // Create a new service with the ...
user avatar
  • 21
0 votes
0 answers
81 views

LWC: Trying to get Access token

I am trying to get an access token from parent salesforce org. Here is the code which I am using: fetch('https://test-dev-ed.my.salesforce.com/services/oauth2/token', { ...
user avatar
  • 657
0 votes
0 answers
72 views

Connected App Error - { "error_description": "invalid_grant", "error_description": "expired access/refresh token" }

I've have successfully created a connected app using our sandbox account by following this Enable oauth settings api integration, However when I try to request for access_token I'm getting the follow ...
user avatar
  • 1
0 votes
1 answer
27 views

Multiple digital signatures against one app

Is it possible to set up multiple valid Digital Signatures against one app? as stated in the title? When we get to cert expiry dates converting the changeover is such a pain it would be nice if I ...
user avatar
2 votes
1 answer
96 views

"Invalid redirect_uri" on OauthKickoffUrl of Custom AuthProvider

The following Apex code uses Metadata and SOAP API to create a NamedCredential and Custom Auth Provider to connect to a public REST API that is authenticated via OAuth. public override PageReference ...
user avatar
0 votes
1 answer
29 views

Connected App OAuth Scopes - full vs. api

I'm wondering if anyone could clarify for me the distinction between the connected app Oauth scopes 'full' vs. 'api'. We have a couple integrations for which I've used 'web' and 'api', and they work ...
user avatar
0 votes
0 answers
80 views

Salesforce to Salesforce REST api integration to same org fails with 401 Unauthorized

The salesforce Field Service Developer Guide has this snippet of APEX designed to make a same-org REST call: String salesforceHost = System.Url.getSalesforceBaseURL().toExternalForm(); String url = ...
user avatar
  • 293
0 votes
0 answers
33 views

salesforce Integration with Zoom

I am trying to Integrate with zoom with salesforce using named credentials. I had created an app in zoom used the client Id and client secret key here in the salesforce auth provider.But It is showing ...
user avatar
2 votes
2 answers
108 views

Using Access Token from OAuth 2.0 Username-Password Flow to access data export page

Experimenting with whether we can easily automate downloading the weekly backup files, based on Enrico Murru's approach here We are trying to use c# because we use that a lot already and dont want to ...
user avatar
  • 4,203
1 vote
0 answers
34 views

External application integration with Salesforce... single logout?

We have an external website that uses our Salesforce community as an identity provider. When a user clicks sign in on the external site, it redirects to our community login page in Salesforce and logs ...
user avatar
0 votes
0 answers
55 views

Problem Logging In - No_Oauth_State: State was not sent back

I would like to connect GoToApi with Salesforce Org. According to their documentation, I need to go to this URL to get the authorization code: https://api.getgo.com/oauth/v2/authorize?client_id={...
user avatar
  • 285
0 votes
0 answers
94 views

JWT Authentication Flow debug and how to call from Postman (for debugging)

There's an existing Salesforce org with a Community Site. There's an error when user logs in and after which I believe it hands off to Angular for further user experience. In Salesforce logs I see the ...
user avatar
-2 votes
1 answer
307 views

Salesforce authentication failure

I am trying to POST to the API Endpoint https://login.salesforce.com/services/oauth2/token as shown in the screenshot this is the first step towards authentication which is failing and giving an error ...
user avatar
1 vote
0 answers
73 views

Single log out for oauth connected app

We’ve followed this guide for single logout (SLO) to call the logout url of our connected app. https://help.salesforce.com/s/articleView?id=sf.connected_app_manage_oauth.htm&type=5 Specifically: “ ...
user avatar
  • 11
0 votes
1 answer
55 views

Unable to get oAuth access token for sandbox after making HTTP POST from postman. Access token is returned for Production environment

I have created a connected app in sandbox. I Have set Selected OAuth Scope = Full I Have relaxed IP restrictions in connected app policies. When i make HTTP POST to get access token, error is returned ...
user avatar
-2 votes
1 answer
79 views

OAuth Error when trying to get Token through JavaScript

I am setting up a connected application and am having trouble generating a bearer token through my JS code. I have it working perfectly through postman, as well as all of my get calls, I use postman ...
user avatar
1 vote
0 answers
177 views

Salesforce Marketing cloud rest API from Salesforce Cloud (apex)

I'm trying do set Auth. Providers and Named Credential for the salesforce marketing cloud in order to be able to make callout from apex without worrying to get and refresh the token. Is there any ...
user avatar
  • 11
3 votes
1 answer
86 views

Salesforce API access using OAUTH2.0 working for some site but not working for others

I'm using salesforce free trial version which doesn't have API access enabled by default. I tried using oauth 2.0 to access the API using access_token and it gave this error API_DISABLED_FOR_ORG. Now, ...
user avatar
  • 133
3 votes
0 answers
39 views

Easy way to do a daily check to see if OAuth2 Connected App is authorized correctly and can access data via API?

I want to do a daily check to see if my Connected App (that is authorized with OAuth2) has a valid authorization and I can query information from the Org using the API. Is there a way to directly ...
user avatar
  • 125
0 votes
0 answers
20 views

How can we get any activity happening related to Oauth established through connected app in salesforce org?

I want to capture all activities that are happening on salesforce related to Oauth established through a connected app. Sort of a handler that can capture activities (eg. revoke or Oauth established) ...
user avatar
0 votes
0 answers
97 views

Named Credentials with Authorization Protocol OAuth 2.0 vs authorization and authentication handled using apex

Could anyone please clarify my doubts. If I use Authentication Protocol as Oauth 2.0 and provide an Authentication Provider for the same with required settings and call a rest end point of different ...
user avatar
-1 votes
1 answer
42 views

What Salesforce Standard URLs for Configuring Web Server Flow Exist and how should I use there?

I am following this video on how to setup web server Oauth Flow: https://www.youtube.com/watch?v=cViU2-xVscA One of the steps involved is setting up the Callback URL and the instructor inserts the ...
user avatar
2 votes
1 answer
115 views

Which OAuth 2.0 Flow Should I Use?

I have an Web App that need to get access to Salesforce Data. The web app just needs one admin to connect and afterwards needs to be able to interact with the Salesforce APIs to push and pull data. ...
user avatar
-2 votes
1 answer
76 views

Salesforce Single Logout (SLO) configuration with multiple relying party

In one of the Salesforce implementation I am working on, a single Connected App is being used for Single-Sign-On (Community users) for multiple relying parties (using OpenId protocol). SSO is working ...
user avatar
  • 709
2 votes
0 answers
58 views

Force Named Credential to get a new access token using Apex

I'm using a Named Credential with OAuth2 to call a SOAP API. This API returns an HTTP 500 after the token is expired, but a Named Credential can only automatically refresh the access token when a 401 ...
user avatar
-1 votes
1 answer
61 views

Most secure method of authentication for an API user? [closed]

We have a need for an external site to call services exposed from our Salesforce org via APEX REST. In previous projects I would leverage a connected app with username/password flow and create an API ...
user avatar
0 votes
0 answers
44 views

How can i create ExternalDataUserAuth for Google integration

I have created Named credentials with Identity type per User and OAuth 2.0 Protocol. Everything works fine if I go step by step in the Settings -> Authentication Settings for External Systems -> ...
user avatar
1 vote
1 answer
139 views

Salesforce OAuth flow - getting a new refresh token

I have setup OpenID to use Salesforce as the IDP for an external site. We are using embedded login and server side callback flow. I have a requirement to set the lifespan of the access token to 60 min ...
user avatar
1 vote
1 answer
59 views

Find org where connected app was created to update its config params (having only consumerKey and consumerSecret)

At some point in the past (many years ago) we created connected app in one of our SF orgs. Since then we've been actively using consumerKey and consumerSecret provided by that connected app when ...
user avatar
  • 2,713
5 votes
1 answer
95 views

Is there a security hole in Salesforce's documentation?

I was looking at Salesforce's documentation for implementing an OAuth callback and I noticed they are accepting a "sfdc_community_url" from the client, which should normally only ever be a ...
user avatar
0 votes
1 answer
93 views

Calling Tooling API via Named Credential and refresh tokens

I am using Named Credential to call Tooling API. I'm seeing this warning on Named Credential and keep losing access to it. Keep getting Invalid Session Id error every few hours. "The ...
user avatar
  • 1
0 votes
0 answers
123 views

How to set up Named Credentials for NiCE inContact Central API?

As the title says, I'm trying to figure out how to set up a Named Credential for the inContact API. I've been searching for specific documentation or examples, but no luck yet. I've currently got the ...
user avatar
  • 1
2 votes
1 answer
365 views

oAuth: implementing Client Credentials flow for calling out to a 3rd party API

GOAL: Retrieve an access token from a 3rd party service so as to make a call with this token to 3rd party API. This is the quote from the doc. The ExternalApp API is accessible using an Oauth2 JWT ...
user avatar
0 votes
0 answers
85 views

invalid_grant invalid assertion POST /services/oauth2/token

I followed up this guide and I believe I did it correctly. However I'm receiving this error from POSTMAN POST /services/oauth2/token HTTP/1.1 User-Agent: PostmanRuntime/7.28.4 Accept: */* Postman-...
user avatar
1 vote
1 answer
474 views

Integration to Salesforce through REST API without using consumer secret/key

I am trying to connect with the Salesforce via API call. I got the access token first by providing username, password, consumer key, consumer secret, grant_type. Then I used the access token and made ...
user avatar
0 votes
1 answer
418 views

Retrieving oAuth scopes from an installed connected app

In the portal, it is easy under the setup console, find a specific application, and see all of its Application Permissions. For example: However, when querying the API for ConnectedApplications, ...
user avatar
1 vote
0 answers
28 views

Storing/Updating Transient Secrets for oAuth with Xero [duplicate]

I am writing a simple Apex class that pulls in some information from Xero to create a new invoice in Salesforce. The problem is that Xero only allows 3-legged oauth, which means I can't just store ...
user avatar
  • 111
0 votes
1 answer
152 views

when I use in postman I recevie this error No_Oauth_State: State was not sent back

can you please resolve this issue when I try to get the new access token in the postman i receive this error No_Oauth_State: State was not sent back We can’t log you in because of the following error. ...
user avatar
  • 13
0 votes
0 answers
24 views

Logout from Salesforce org when logged out from connected app [duplicate]

I am building a nodejs application using Express and JSforce libraries. I am using a connected app in SF for authentication using oauth2.0. So when I login to my nodejs application, it redirects to ...
user avatar

1
2 3 4 5
16