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
2
votes
1answer
397 views

Is it required to change OAuth endpoints based on custom domain?

We have done integration between .net application and Salesforce. Currently we are using the primary OAuth endpoints from .net application for authentication: For production: For authorization: ...
1
vote
1answer
38 views

Calling REST APIs from Lightning

We are currently working on an app where we are calling the Tooling API from our Lightning component Since UserInfo.getSessionId() is not valid in Lightning context, to make the call we are using VF ...
0
votes
0answers
18 views

invalid_grant: expired authorization code when using OAuth2 flow

I am using OAuth2 to authorize the user I generate the URL at the backend send the url to the frontend (which is in VUE ) which open it in the new window the callback url is one of the route of the ...
13
votes
3answers
24k views

OAuth Access Token Expiration

I have read many places that the access token session length is controlled by the client application and will expire "from time to time", but I cannot find a way for my application to calculate the ...
0
votes
0answers
23 views

How to determine service provider connected app in Login page?

I have a setup where Salesforce is the Identity provider and the authorization flow is service-provider initiated (where the service provider supports oAuth, not SAML). The login page is reached and ...
0
votes
1answer
37 views

Lightning out with error 500 on NodeJS server

I'm tring to outsource my aura component with lightning out using a connected app but I have a 500 error. (I have no problem connecting with the user/password/token mode). CORS are well set (localhost:...
2
votes
2answers
2k views

Salesforce SAML Assertion - Failed: Missing Consumer Key Parameter

We are developing native mobile app where we are using oAuth token for Salesforce API access. We want to have SSO integrated with some SSO provider like Okta which generates SAML response,where we are ...
-2
votes
0answers
33 views

Use of Credential Class in Named Credential

Please let me know "{!$Credential.UserName}" and "{!$Credential.Password}" will return named credential username and password or it will return salesforce username and password I ...
0
votes
1answer
785 views

Wrong instance url while generating the token for OAuth 2.0 authentication

I am a novice in salesforce. I have access to multiple sandbox instances of salesforce. I am trying to do an OAuth2.0 authentication and call some rest api. But when I request for the token, in the ...
0
votes
0answers
19 views

How to obtain URI with hash or fragment(#) in MuleSoft

Let's say I have very simply Anypoint platform application with HTTP Listener. I'm wondering is it possible to obtain all data from the uri. My uri is - localhost:8081/callback#param1=1&param2=2 ...
0
votes
0answers
37 views

Cannot connect to sandbox using JWT

I connected to Production Org with JWT through connected app without any difficulty. However, by applying the same procedure, I could not connect to Sandbox using JWT. Here is my command: sfdx force:...
3
votes
1answer
751 views

JSForce - getting OAUTH2 refreshToken - variable app is not defined

I am clearly missing something called app here. I am following Authorization Request section from the documentation. It says your app is callbacked from Salesforce with authorization code in URL ...
4
votes
2answers
987 views

Does Salesforce support the Client Credentials Grant for OAuth?

For every API I'm consuming from Salesforce so far, I'm using the Client Credentials Grant for everything that's just between servers (= no user involved). It seems that Salesforce itself does not ...
2
votes
1answer
380 views

Obtaining an OAuth access token on behalf of another user for a native app

I have a native iOS application that uses a standard OAuth flow to authenticate to the Salesforce REST API and fetch data for offline viewing. I have a requirement in the app for one user to be able ...
0
votes
0answers
31 views

How to authenticate oauth2 for canvas app?

I have a node application deployed on heroku that authenticates with salesforce using oauth2 webflow using connected app. I want to create a tab in salesforce that directly lands to the homepage of ...
2
votes
1answer
83 views

Status code 401 Client must be authenticated to access this resource [closed]

I have created Auth provider in Salesforce, linked it with Named credentials and it Authenticated successfull, now I am doing callout using below apex. apex class: private static string ...
2
votes
3answers
154 views

How to integrate JIRA with salesforce using OAuth 2.0 [closed]

I am banging my head against the wall from the last couple of weeks to just set up the authentication between JIRA cloud and salesforce, I didn't get any proper documentation to create a connected ...
3
votes
1answer
708 views

Log in to Community with OAuth Access Token

I am getting an access token using JWT Bearer Token Flow. I'm trying to log in to a Community through "frontdoor.jsp" with the token. Looking at this question, it doesn't look possible. But the ...
1
vote
1answer
806 views

OAuth token request via username and password in python

All this while it was working and not sure what have changed. The point of failure is within this code block import urllib2 url = 'https://test.salesforce.com/services/oauth2/token' data = '&...
0
votes
1answer
493 views

OpenID Connect - ID Token vs Access Token

I have setup a connected app with the "openid" scope. Using the web server flow, my callback is able to get the Open-ID JWT from "id_token", generated by Salesforce. My API has no problem validating ...
3
votes
2answers
655 views

“App must be invoked via a signed request” shows in Canvas Previewer

I have connected App and added external link of Heroku to show as Canvas App. I have set the location Chatter Tab. In the developer account, my external application is accessible. It has set "Admin ...
0
votes
0answers
19 views

Canvas App - Connect to Another Orgs VFP using Web server flow + API User

I am trying to wrap my head around Salesforce Canvas apps and its authentication. My test use case is to be able to access / interact with a visual-force page located in another Salesforce org. ...
3
votes
2answers
109 views

oAuth - Introspection endpoint says a valid access token is inactive

I'm new to salesforce and I'm trying to obtain a access token with password grant, I can successfully obtain the access token: Request: POST /services/oauth2/token HTTP/1.1 Host: .....my....
0
votes
1answer
74 views

Authorization via JWT yields an “invalid assertion” error

I failed to request an access token. Following doc to authentification using JWT, I already have my connected app, my JWT Key so I just need to make a POST requestion to : https://test.salesforce.com/...
1
vote
1answer
29 views

Custom Auth Provide- Script Thrown Exception after token expiration

I have written custom Auth Provider by extending AuthProviderPlugin class. I attached this Auth with Named Credentials with proper scope. The target system is responding with both access token and ...
1
vote
1answer
44 views

Grant types supported by the Rest API [closed]

I have created a Apex Class and exposed the data as a REST API like below. global with sharing class ReteriveSFAccountData { @HttpGet global static void doGet() { try{ } } ...
1
vote
1answer
119 views

How does a website that accesses my salesforce metadata/data authorize against my org?

I am attempting to create a web app (ruby on rails) that requires access to a user's Salesforce environment to perform some REST api calls (SOQL queries) and in doing so I've implemented the web ...
1
vote
1answer
125 views

Using Named Credential + OpenID Connect auth provider to obtain access token with client_credentials grant

I am trying to use the Named credentials for the first time without using the named credentials directly if I call the endpoints with credentials it works perfectly fine which uses OAuth where I get ...
0
votes
0answers
33 views

Acquiring an access token in a sandbox [duplicate]

I am using Postman to test the connected app I set up in a Salesforce sandbox environment. When I send the request to https://xxx--partial.lightning.force.com/services/oauth2/token, I get an ...
2
votes
1answer
88 views

Generating Salesforce OAuth2 token via SSJS returning empty response

I am trying to generate OAuth2 SF token via SSJS code on a CloudPage. I am not sure why I receive an empty response here. Following is my code <script runat="server"> Platform.Load("core","1");...
4
votes
1answer
123 views

Can we add SSO in managed package?

I have an app which is using SSO to integrate with salesforce. Salesforce is used as an identity provider. So my question is can I add SSO in managed packaged? Because we want to provide an managed ...
-1
votes
1answer
43 views

how to deploying connected app [closed]

I am trying to create a Connected App and publish in App Exchange ..for that reason if any user will download the App from App Exchange, the connected app should be installed automatically in user org
0
votes
1answer
25 views

Using a Connected App to upload a large amount of data

I am attempting to use a connected app to upload a lot of data to our Salesforce instance using our API but am running into an issue with not receiving an access token every time I request one. In ...
1
vote
1answer
63 views

Access token - expiration semantics

I am currently working on exposing the SF data as an API so the external system can consume it. I created a account for the external system to access the data through the API. Salesforce provides the ...
5
votes
1answer
549 views

Why would I use the “Existing User Linking URL” in an Authentication Provider

The authentication provider documentation provides a fairly good description for what the 'Existing User Linking URL' does, but I do not understand the context for where and when this URL would be ...
0
votes
0answers
22 views

DX CLI - Localhost EACCESS

I am trying to get the DX CLI to successfully open on a sfdx force:auth:web:login command, but continue getting this error: { Error: listen EACCES: permission denied 127.0.0.1:1717 at Server....
2
votes
3answers
2k views

Oauth 2.0 Client Credentials - Custom Auth Provider

I am building out a Salesforce Connect customer adapter to translate rest responses into external data objects. To authenticate these requests, I would like to use Oauth 2.0's client credentials flow ...
1
vote
2answers
38 views

oAuth: setting it up for server-to-server connection with External Objects

I'm setting up External Objects using Salesforce Connect (aka Lightning Connect) and OAuth. I've configured the Authentication Provider to use the OAuth parameters and the External Data Source to use ...
0
votes
0answers
26 views

Adding a Log In using Salesforce button

I am building a web application that will read/write data from a user's salesforce org. Is there any way to put a button on my site that says "Login with Salesforce" and when clicked, it would ...
3
votes
1answer
90 views

Is OAuth 2.0 User-Agent Flow truly an Implicit Grant Type?

Is the Salesforce User-Agent Flow truly an "Implicit" grant type? It can most definitely issue a refresh token. And yet per RFC 6749 Section 4.2 Implicit Grant documentation... The implicit grant ...
1
vote
2answers
2k views

How to issue/send access token from apex page to connected app

We have implemented 2 OAuth flows between our app and SF where SF is auth provider - Web Server and Username and Password Now we have use case where user is signed on SF and has to invoke our ASMX ...
1
vote
1answer
66 views

Issue getting public key, getting 400 Bad Request using JWT+OAuth while integrating salesforce with Box.com [closed]

I am trying to get access token from box.com. For this I created a custom app that uses OAuth and JWT. I have also created a self signed certificate in salesforce. This self signed certificate is used ...
3
votes
3answers
751 views

Named Credential - Automatic refresh token does not work with WSO2 Identity server

I am facing an issue with the named credential platform functionality in the following integration scenario: The Salesforce Org is supposed to perform Rest callouts to a 3rd party service. ...
3
votes
1answer
1k views

SAML bearer flow for retrieving an OAuth token gives an assertion error

i'm posting the following request; trying to get an OAuth token: POST /services/oauth2/token?grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Asaml2-bearer&assertion=...
0
votes
2answers
71 views

How to Authenticate when Accessing Custom Apex REST Web Service [duplicate]

I thought this would be a simple thing to find, but all the documentation deals specifically with either creating an Apex web service, or accessing the SF REST API in some general way - but what about ...
0
votes
0answers
19 views

Salesforce Connect: Cross-Org Adapter Configuration

I am currently working on an issue that requires connecting data between Salesforce Orgs. The intent is to use Salesforce Connect to share data using External Objects. While setting things up I have ...
1
vote
0answers
86 views

OpenID error: No_Oauth_Token unauthorized_client

I am following this doc to implement an external authentication provider. So far I was able to be redirected to their site, authenticate there and be sent back to SF. However, when I am sent back to ...
1
vote
1answer
44 views

“Application not found” error while authorizing an org using visual studio code

I am trying to authorize an saleforce org from VS Code using salesforce CLI but I am facing following error "Application not found" (please refer attached screenshot for more details).What should I do?...
2
votes
1answer
160 views

OAuth+SSO login works with Data Loader GUI but not Data Loader CLI

GUI On my Windows machine, I can login with GUI Data Loader 44.0.0 without providing a username and password, by choosing "OAuth" and "Production" environment and clicking "...
0
votes
1answer
58 views

Error: `the requested scope is not available` with scope=full+refresh_token in User Agent OAuth Flow [duplicate]

I am using the OAuth 2.0 User-Agent Flow for Desktop or Mobile App Integration to authenticate my connected app. My redirect Url is: https://login.salesforce.com/services/oauth2/authorize? client_id=...

1
2 3 4 5
14