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.

1
vote
1answer
21 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
0answers
9 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 ...
1
vote
1answer
69 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
82 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 ...
0
votes
1answer
63 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 ...
1
vote
1answer
50 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 ...
0
votes
1answer
63 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
0answers
26 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
27 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
0answers
19 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
1answer
73 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 ...
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....
0
votes
3answers
395 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 ...
1
vote
1answer
53 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/...
0
votes
1answer
32 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, ...
2
votes
0answers
39 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
48 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 ...
0
votes
1answer
32 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 ...
1
vote
0answers
49 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
0answers
10 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
66 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. ...
0
votes
2answers
132 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
0answers
59 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
217 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 ...
1
vote
0answers
85 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","...
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....
2
votes
0answers
134 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
272 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
67 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 ...
2
votes
0answers
22 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. ...
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
0answers
48 views

Decrypt challenge in Salesforce from external system in 2FA

We are integrating salesforce with external system. External system has two factor authentication process. We are calling first URL to get challenge. - Working fine. We need to decrypt challenge in ...
0
votes
0answers
83 views

When would a Client Application be unable to use the User-Agent OAuth Flow (but able to use Web Server OAuth Flow)?

A Client Secret is no longer required for Web Server OAuth Flow. This is not a new feature (Spring'17), but I have not given it much thought until now. "If a client application can’t securely store ...
0
votes
0answers
29 views

Disable custom connected app from profile

I have a custom connected app that is used for OAuth purposes (outside of Salesforce). Therefore I don't need it to appear in the app launcher, unfortunately I see no way to remove it, at least for ...
0
votes
0answers
34 views

How to consume OAuth 1.0 webservice in salesforce

I have another application which I need to call and they are using OAuth 1.0. now I am calling their system endpoint, I have client id and client secret only. Do I need to generate token also? ...
3
votes
1answer
190 views

How does the automatically created connected app works when I use workbench?

I've read this article but I'm still confused about what happens when I approved the access from workbench. The connected app "Workbench" seems automatically created in my org when I approve the ...
0
votes
1answer
36 views

OAuth with 3rd party providers

I'm trying to integrate Salesforce with Google apps in Apex. For this I need to do OAuth with google. However, I'm confused with what value should be given for redirect_uri to google. I can create a ...
0
votes
2answers
264 views

What is difference in Web Server and User-Agent OAuth Authentication Flow

I have just started learning Rest API from developer guide. I'm not able to understand the difference in Web Server and User-Agent flow, both seem to be same, the only difference in Web Server is ...
1
vote
1answer
488 views

Is there any way to generate Authorization Code programmatically

I've come in such a circumstances where I need to pass authorization code without oauth login. User will be already login in salesforce and will be clicking on external link and that external server ...
1
vote
2answers
748 views

oAuth 2 token Request Invalid

I have created a connected app in salesforce so that the external system can connect to our org. They are using oauth2 so i have set it up accordingly and shared the client key and client secret. ...
2
votes
1answer
432 views

Google OAuth and UI - is is possible to pass back the authorization code not in the URL?

Is it possible to use Google OAuth and have no UI ever? My thought is: save the account credentials and refresh token into a custom setting and keep calling that every time. So the flow would look ...
4
votes
1answer
322 views

Google OAuth and Authorization Code

I have a two part question but I will break it up into two separate posts. Hopefully the first question will answer the second...The first ask is: I am working through the Google OAuth flow and would ...
0
votes
2answers
155 views

Salesforce API Access without App-Register?

We have to design an application and retrieve data from salesforce. Therefore, I have to authenticate my web app to Salesforce to make API calls. As I read in the documentation, I need to define our ...
0
votes
0answers
86 views

Salesforce Oauth 2.0 JWT

I am getting below - {"error":"invalid_grant","error_description":"user hasn't approved this consumer"} Dev org To Dev Org, below are the connected app -
0
votes
1answer
159 views

SSO - delegated/federated limitations with community

I'm looking into implementing SSO for customer community. I've been reading the documentation on SSO implementation using either delegated or federated authentication. I have not done SSO before so I'...
0
votes
1answer
221 views

Java - Creating BulkConnection object with Oauth token

I have successfully been able to create a bulk API connection with the following code that calls the SOAP auth endpoint: ConnectorConfig partnerConfig = new ConnectorConfig(); partnerConfig....
1
vote
0answers
67 views

How to delivery Salesforce API access in Managed Package when using Lightning Component

Trying to build managed package that can analyze metadata configuration, flow specifically. Building as Lightning Component. Looking for a solution to delivery a Named Credential capable of accessing ...
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
2answers
429 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 ...