Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [oauth]

OAuth is an open, standard, protocol to allow users to securely authorize web, mobile and desktop applications to access web services on their behalf. Salesforce supports OAuth 1.0a and 2.0.

3
votes
3answers
2k views

How do I retrieve the server and session id from the Salesforce iOS API?

I'm currently trying to hack in some functionality to download attachment data for an iOS Salesforce application. I'm going to do that using a direct HTTP request, but for that to work I need to pull ...
0
votes
2answers
345 views

Pass parameters through Redirect URI in oauth flow, to know sandbox or regular

I use the oauth flow to allow users to authorize my Salesforce app to access the API on their behalf. Depending on input in my app, I either prompt them with https://login.salesforce.com/services/...
1
vote
1answer
34 views

Expired authorization code and Invalid Nonce errors

We recently launched a mobile app and we use Salesforce Identity Management. ie all customers have a Salesforce user record and authentication is done is Salesforce. After the launch, some users were ...
0
votes
3answers
564 views

Cannot connect a Salesforce org using Authorize an org in VS Code

Using VS Code, after I enter the command line "Authorize an org" I get redirected to Salesforce login and can successfully log in. However I then get the error "This site can't be reached" The URL ...
0
votes
0answers
10 views

.NET CORE: Send Custom XML as SOAP message for Triggerred Send Email

We are trying to achieve "Triggerred Send Email". https://webservice.boa.exacttarget.com/Service.asmx We are experiencing issues with soap message format being generated by visual studio wherein it ...
2
votes
1answer
762 views

JSForce: Error invalid session id

Using JSForce, I create a new connection using the access and refresh token like so: new jsforce.Connection({ oauth2: { clientId: clintId, clientSecret: clientSecret, ...
0
votes
1answer
102 views

Cannot list users - ERROR running force:user:list: Must pass a username and/or OAuth options when creating an AuthInfo instance

When I run sfdx force:user:list this is the error message I get: ERROR running force:user:list: Must pass a username and/or OAuth options when creating an AuthInfo instance. This issue came up ...
1
vote
1answer
115 views

{“error”:“invalid_grant”,“error_description”:“authentication failure”}

Hi I am trying to connect one salesforce org to another but getting below error in response body while trying to get the access token using the username password flow in oauth. Please suggest what is ...
0
votes
1answer
109 views

Persistant INVALID_AUTH_HEADER with curl on macos

I'm using curl to connect to a Salesforce org with OAuth (I'm following this tuto and get stuck at step 3): 1) Perform a User Agent OAuth request to get the session data below: { "access_token"...
1
vote
1answer
56 views

Authorize a DevHub using SalesforceDX without password

I am working on SalesforceDx and I have to authorize my devhub by just using Username of the org I dont want to enter password. I have tried JWT token for authorization but it uses an OPEN SSl ...
2
votes
1answer
351 views

Community login without redirecting user to Salesforce with SSO or OAuth

We are building a Drupal site for one of our customers. Our customer wants to use the Salesforce self-registration and community login features for authenticating their customers to the CMS. As far ...
0
votes
1answer
70 views

JWT Bearer flow vs. Username+Password flow in server-to-server integration

Official documentation and some SFSE answers advise against the use of Username + Password flow (Resource Owner Password Credentials Grant in oauth). The JWT Bearer flow is also recommended as a ...
4
votes
1answer
756 views

Returning Oauth token with REST API via PHP arrays when trying to send new contacts

In the salesforce REST API documentation, it tells how the system can give Oauth Tokens (https://code.exacttarget.com/apis-sdks/rest-api/v1/auth/requestToken.html ) But I don't seen any documentation ...
0
votes
2answers
168 views

How is named credentials & auth provider with connected app used? Can i have scenario where it is needed?

I have seen people use auth. providers that has client secret and id of connected app and authenticated using named credentials. The named credentials stores the oauth refresh token but I am not ...
1
vote
2answers
688 views

Named Credentials - Refresh Token - Google APIS

I am getting following error on trying to OAuth with Google APIs, using Named Credentials. This error comes after doing OAuth dance via Setup > Named Credentials or My Settings > Authentication ...
1
vote
0answers
30 views

Posting SAML assertion to get an OAuth token

I have 2 service providers, SP1 and SP2 and I have obtained my SAML response from IDP into SP1. Now, in order to connect SP1 and SP2 I am using the oauth SAML response from SP1 and posting it to oAuth ...
1
vote
1answer
32 views

SAML bearer assertion flow for retrieving an OAuth token

I am using SAML assertion to retrieve an OAuth token and I am using a custom apex class to generate the SAML assertion. My IDP is set to send User's FederationIdentitfier in Subject (SAML Response Pic)...
1
vote
1answer
82 views

Sandbox OAuth Error 1800 through VS Code, CLI, and MavensMate

I'm trying to sign into a sandbox org, but I'm getting an error when running through the OAuth flow: We can't authorize you because of an OAuth error. For more information, contact your Salesforce ...
2
votes
0answers
25 views

OpenID Connect single logout

I have a connected application (web site) that is using Salesforce as an authentication provider (OpenID Connect). And I'd like the logout on my site to work as a "single logout" - it should also log ...
1
vote
2answers
457 views

INVALID_SESSION_ID error when external app is calling GETmethod on salesforce

I have created webservice class with Get method. I have created Connected app and I have consumer key and consumer secret.But I don't have knowledge on how to use it. When external app is calling ...
4
votes
1answer
373 views

possible to access REST API of another SF instance with portal user from scheduled class?

I have a scenario where I'd like a user of another SF instance to register in our portal, then have a scheduled class on their end reach out to a REST endpoint on our end. Upon reviewing the oAuth ...
0
votes
1answer
35 views

React.js GraphQL web app returning random null values

I'm working on a React.js web app that leverages GraphQL for accessing a combination of varying endpoints, including our org's SF data. My only issue is isolated to my Salesforce progress. In general, ...
1
vote
1answer
2k views

Salesforce Error - 1800: There was a problem in setting up your remote access

I am new to salesforce and I just was done with setting up Mavensmate Desktop with Sublime Text 3. I am trying to create a new project where I have given the correct credentials to connect to my dev ...
1
vote
1answer
417 views

How to access the context in the canvas app using payload?

Based on the canvas documentation, i have setup the canvas app so that the authentication is OAuth. Also, I have been in the assumption that OAuth flow can be handled entirely through javascript ...
0
votes
0answers
42 views

I have the ClientID and ClientSecret, I receive the same error after multiple attempts

"https://developer.salesforce.com/docs/atlas.en-us.mc-apis.meta/mc-apis/error-handling.htm","errorcode":404,"message":"Not Found" Here is my request https://subdomain_name.auth.marketingcloudapis....
1
vote
1answer
64 views

Add a custom header property in JWT assertion for OAuth

How do I add additional header properties to my JWT using the JWTBearerTokenExchange Class? (https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/...
2
votes
0answers
487 views

Connected App-Trusted IP Range for OAuth Web server flow

I am trying to understand the use of Trusted IP Range for OAuth Web server flow setting of a connected app but the documentation is not clear to me. Does it override profile level IP settings? How ...
5
votes
2answers
3k views

Pros and cons of user-agent flow vs web server flow

After looking into the different OAuth types and reading this question, I'm still confused on the specific pros and cons of user-agent vs web server flows. The best explanation I can find says that ...
1
vote
1answer
578 views

How to do programmatic OAuth flow between RestResource and Server Application

I have an external application that has a bunch of information to create new Lead objects. As well I've created a RestResource Apex class that is mapped to URLs on the salesforce instance for my ...
2
votes
0answers
42 views

Errors with Web Server OAuth Implementation

I am trying to implement Web Server OAuth flow from one Salesforce Org to another. Following is the Class which contains the logic. I am hitting custom rest api to insert Accounts using the access ...
0
votes
0answers
57 views

Automatic login with Salesforce

I would really appreciate if anybody could guide me to achieve this requirement. A user has told me recently that in his company, the technology team has developed a desktop app whose main purpose is ...
1
vote
0answers
51 views

id_token not returned in JWT Bearer Token OAuth Flow

As per the JWT Bearer token documentation The id_token will be return if there is a pre-existing approval for the openid. I have existing approvals for openid for the user. Am I missing something in ...
0
votes
1answer
39 views

Token generation for Einstein Sentiment API

I am trying to implement the sentiment api but having issue while generating the access token. I have uploaded einstein_platform.pem file in Files in Salesforce. ContentVersion con = [SELECT Title ...
0
votes
0answers
12 views

Community user needs to redirect to login page when logged out

We have a community and users who are using the community are logging into Community using Third party authorization. When logged out, it is showing that the user is still logged in with an error ...
0
votes
1answer
91 views

Redirect to Authentication Provider Page instead of salesforce login page

I have created an open id connection between external authentication provider and salesforce. Now the requirement is when my domail url is entered in browser, it has to redirect to authentication ...
0
votes
1answer
40 views

Restrict the user to get oAuth token from custom app in salesforce

we have an android app which is connected with Salesforce. From the Android app, we will pass the username and password to the salesforce to get oAuth token. I have created one checkbox field i.e. ...
3
votes
1answer
1k views

Username-Password OAuth Authentication for community users?

I have a native ios app and i want to login using the username password flow, From the POC i made i discovered that for community user, i dont get a security token which i was using while REST call to ...
1
vote
0answers
93 views

[Talend SF Connection JWT]runtime exception https status 400-bad request message {“error”:“invalid_grant”,“error_description”:“audience is invalid”}

I am facing an error while trying to establish the Oauth connection (JWT) between talend ETL tool and salesforce : runtime exception https status 400-bad request message {"error":"invalid_grant","...
1
vote
0answers
61 views

Google Login in Salesforce1 App Disallow Useragent iOS

We used to be able to use the mobile app for iOS without a problem. Now if we go to log in and click the Google Login button, the immediate message is a 403 disallowed_useragent message. Logging in ...
0
votes
1answer
220 views

OAuth Error when attempting to Deploy the ApexMocks open source library in Trailhead unit 'Apply Unit of Work Principles in Apex'

I'm logged in to Trailhead as myself and working on this unit: https://trailhead.salesforce.com/content/learn/modules/apex_patterns_sl/apex_patterns_sl_apply_uow_principles Scroll to 'Preparation for ...
2
votes
1answer
78 views

Authenticated Oauth workflow required constant login

I am very new to the Salesforce API. I am creating a library which connects to Salesforce and accesses data etc. I am implementing the Web Server Oauth Authentication workflow (https://developer....
7
votes
2answers
2k views

Using OAuth 1.0 encoded requests for external webservice calls

I have a business requirement that necessitates a callout from Apex to an external .NET based web service that receives signed OAuth responses. There is no built-in support for this in Apex, but ...
2
votes
0answers
151 views

Salesforce OAuth2 invalid_grant: user hasn't aproved this consumer on AWS

I have developed a client application that accesses Salesforce REST API through OAuth 2 using the Go programming language. Everything works fine locally: I have a correct token, client ID, client ...
1
vote
1answer
302 views

Salesforce calling external application using OAUTH

I need to call an external service FROM salesforce Authenticating against the External application is done via OAUTH so basically I need to write APEX code that uses HttpRequest and passes in the ...
0
votes
1answer
86 views

OAuth 2.0 Device Authentication Flow - invalid device code

I am trying to implement OAuth 2.0 Device Authentication Flow. In first step i received device code successfully. Then i have created JWT token using device code and and other details. Send it to ...
1
vote
1answer
870 views

SSL certificate problem: unable to get local issuer certificate, curl_errno 60

I'm trying to integrate PHP script with Salesforce by following the example on the link: http://developer.force.com/cookbook/recipe/interact-with-the-forcecom-rest-api-from-php But I get the error ...
2
votes
0answers
23 views

Can Social Logon be used directly from a native mobile app?

We have a Customer Community with Facebook and Google set up as Auth Providers. In addition, we have a mobile app that connects to Salesforce using OAuth towards this community. This all works fine. ...
11
votes
2answers
537 views

OAuth interactions: do they count as API calls?

OAuth token grants and token authorizations are human interactions that take place in the browser. And token refreshes happen to be machine interactions. Do any of the typical OAuth interactions count ...
3
votes
1answer
61 views

Is session duration guaranteed?

Let's assume that our session timeout value is set to the default 2 hours. The documentation defines this value as Length of time after which the system logs out inactive users. If the user is ...
2
votes
2answers
373 views

Where is the URL where I can Enable OAuth Settings?

I am trying to follow the directions here: https://help.salesforce.com/apex/HTViewHelpDoc?id=connected_app_create.htm I click "Setup" and I create a new app. But I do not see any link offering me ...