Stack Exchange Network

Stack Exchange network consists of 174 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
Make your voice heard. Take the 2019 Developer Survey now

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.

0
votes
0answers
6 views

Commerce Cloud: setting External Login information via the Data API?

for an integration that we are developing, we'd like to prefill External Login data for a Customer via the CommerceCloud Data API. However, a suitable API call does not seem to exist: the Customer ...
0
votes
0answers
36 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
1answer
17 views

Unable to authenticate through REST API when using scratch org

I'm having some trouble getting the REST API to work on a scratch org. When I call the login endpoint I get the error "invalid grant". (This happens when I try test.salesforce.com as well as login....
0
votes
0answers
7 views

Einstein access token generation

I am using below code to generate the access token for sentiment api on einstein platform. But everytime I am getting value null. ContentVersion con = [SELECT Title ,VersionData ...
1
vote
0answers
27 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
24 views

Salesforce Oauth Token for Public apps

How the Workbench and other Public apps get access token for salesforce Even we didn't create any Connected App for that and Even for Sign in they redirect to standard salesforce login Page.I checked ...
3
votes
1answer
50 views

Uncommitted Work Pending - Working around DML then WebService

I am working with Salesforce Connect and I am storing my token and expiration times in an encrypted custom setting. My connection is through the client credentials Oauth 2 flow. When a user queries ...
0
votes
1answer
32 views

How to connect to one salesforce org from another salesforce org

How to connect to a salesforce org to another salesforce org using web based login and without a connected app. I want to connect to sandbox orgs from prod org and do not want to create connected ...
0
votes
0answers
28 views

400 bad request / invalid_grant occurs every other auth attempt

I'm having some strange behavior while using the OWIN Auth providers package for C# . When I make my first attempt to authenticate, I can see a 400 error in fiddler: 46 {"error":"invalid_grant","...
1
vote
0answers
29 views

How can I programmatically find out when an accessToken expires with the OAuth Token Refresh Flow [duplicate]

My company is using the OAuth "Refresh Token" flow, and can get an accessToken and refreshToken fine using this flow. The problem I'm having is that the responses we receive from Salesforce don't ...
3
votes
1answer
97 views

REST API OAuth2 CORS Issue

Problem: I have a separate app, from which I want to allow the user to authorize sharing data with Salesforce. The user clicks a button on the site, which executes a Javascript function that makes a ...
0
votes
1answer
42 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 ...
0
votes
1answer
65 views

OAuth 2 Client Credentials - Missing 'grant_type' & Length Required

Trying to connect to an endpoint to receive a token back. Http http = new Http(); httpRequest request = new httpRequest(); request.setHeader('grant_type', 'client_credentials'); request.setHeader('...
3
votes
1answer
52 views

Custom OAuth Auth Provider

I have a Rest API Endpoint that I am looking to callout to. Something like this: https://myrestservice.com/service/logs When setting up the Named Credential, I set up the URL to: https://...
2
votes
1answer
21 views

Can I use the oAuth access_token to get the final segment in the web service URL?

Kind of a weird question but I'm trying to get the web service URL. My SforceService() object in C# has the first part of the URL but the final segment of it I still need to get. I know I can query ...
1
vote
0answers
42 views

OpenID Single Sign On - Change Authentication Flow

I have an Auth Provider created with OpenID and everything is working good. But, I would like to change the Authentication Flow from web server to user-agent Source: https://help.salesforce.com/...
1
vote
1answer
31 views

How to perform SOQL query after retrieving access_token and instance_url via oAuth2 flow?

I have successfully setup my oAuth2 flow, created a Connected App and I can retrieve an access_token and instance_url just fine. Now that I have those two pieces of data, how can I perform SOQL ...
-1
votes
0answers
73 views

Named Credential: Authentication process Error 'No_Oauth_State: State was not sent back'

I've begin working with Auth. Provider and Named Credential for the first time and I'm facing below issue in the authentication process. Named credential setup : Identity Type : Per User ...
2
votes
1answer
42 views

How to connect to a third party REST API using OAuth?

I have a third party REST API that needs to be called from Salesforce, using OAuth for authentication. Is this actually possible? If so, how? I really can't find anything useful on the web. For me, it ...
2
votes
1answer
44 views

Outbound Message Workaround for using Oauth

I am trying to do simple integration using outbound message. However, I would love to be able to add authorization headers to the SOAP message as the requirement is that we use Oauth2 to authenticate ...
0
votes
1answer
58 views

Query Contact using metadata api from soapui or postman

I am working on an assignment where I need to pull specific fields on the contact object with metadata api using Postman or SoapUI. The metadata api works fine from Salesforce workbench using the ...
2
votes
1answer
59 views

Doesn't a Named Credential handle OAuth2?

Reading this doc from Salesforce, it was my understanding that a named credential handled authenticating when using it to make a callout. I'm going to go out on a limb and say that it probably does, I'...
1
vote
0answers
31 views

How can I update a User Record from a custom AuthProviderPlugin's getUserInfo() method?

I am trying to integrate Salesforce with Jira using a Named Credential and oAuth 2.0. The Named Credential requires a Custom Auth. Provider which requires an AuthProviderPluginClass. The ...
1
vote
1answer
46 views

Where is the certificate for Open Id Connected App in Salesforce?

I have created a connected app and used scope -"Allow access to your unique identifier (openid)". I am expecting a "id token" which would be a JWT token. But where from would I get the digital ...
2
votes
0answers
35 views

Silent authentication using Oauth2 for client app

I am developing a client app which will be authorized by SF accounts using USER AGENT FLOW. I want to achieve silent authentication wherein SF users of the account will automatically authorize ...
0
votes
1answer
29 views

OAuth2 User-Agent Flow: how to tell when access_token expires?

I'm using the User-Agent flow, and I successfully get back a, access_token. From here I have no way to determine when this token expires. I was hoping, that calling the https://test.salesforce.com/...
0
votes
0answers
16 views

Does OAuth in Salesforce Communities need Just-In-Time?

I need to implement OAuth authentication for a Salesforce Community and I'm not quite sure how Just-In-Time works for this protocol. Its quite clear that using SAML we can use JIT to create the ...
5
votes
0answers
184 views

Named credential does not work with client credentials

I have read the full documentation and have few questions on how named credential works. I have written a custom provider like this: /** * Description of the class * <p /><p /> * @...
0
votes
1answer
32 views

How to find the mandatory fields on Sobjects in RestAPI /describe

I am trying to create an oAuth based app that integrates with salesforce to create the objects from the app. To let users know what all fields that users needs to put in at minimum to create the ...
0
votes
1answer
17 views

Can we customize/brand the `setup/connect` page used in the Device Authentication OAuth flow?

We have a device app using the Device Authentication OAuth flow towards Salesforce. This flow returns an url (https://domain/setup/connect) and a user code that the user has to enter into the page at ...
1
vote
0answers
67 views

Salesforce OAuth 2.0 JWT Bearer Token Flow id_token

According to this guide id_token should be in the response if scope parameter contains openid, however the same guide says that scope parameter is not supported. As I've verified no id_token issued ...
0
votes
0answers
20 views

Is there a concurrent API limit on calls to /login/salesforce/authorize

Our Application is iFramed and we have implemented Salesforce SSO using web flow we have implemented 4 iframe component of our application and these components lie under the accounts in the cusotmer ...
3
votes
1answer
52 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
1answer
57 views

Ramdom failure on https://login.salesforce.com/services/oauth2/token request

I am connecting with the Salesforce API using OAuth, refresh_token, client_id & client_secret. API calls are failing randomly with, it's not every API call but 1 in 100 or sometime in 1000 will ...
0
votes
1answer
39 views

Is there a Salesforce sign-in that can be used for code [closed]

Does Salesforce provide a login method dialogue or window service that can be used within code? I'm looking for something much like the Google Sign in screen that can be integrated on the web or via ...
0
votes
0answers
56 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 ...
2
votes
2answers
146 views

OAuth flow for using my app as the authenticator

I'm using SF Restful API to develop an app. A generic use case of the app would be: User logs into the app (app specific credentials) User requests data available @ SF. App knows that user is allowed ...
4
votes
1answer
415 views

Named Credentials and support for the OAuth2 Client Credentials Grant Type and alternatives

I have a requirement to authenticate to an external API for callouts using the OAuth2 Client Credentials Grant (This was helpful in referencing the different grant types for me). I would like to use ...
1
vote
0answers
80 views

Missing unique Third party identifier

I am trying to configure Salesforce to use my custom Identity provider(Based on Identity server 3) as oAuth Provider similar to Google. I am able to successfully achieve it but facing one issue with ...
0
votes
0answers
15 views

How to use SFOAuthCoordinator to support the OAuth/SAML Authentication flow?

I have the OAuth/SAML authentication & authorization flow working from a web browser, but I want to add it to our custom mobile app. Everything is configured correctly on the server, and we have ...
1
vote
2answers
308 views

Can not authorized connected app on Sandbox [closed]

I have an connected app configured on my prod instance, that I use for my Production, my Staging sandbox (Partial Copy) and my Developer sandbox (Blank Sandbox). When I use the app credentials (...
1
vote
2answers
267 views

Salesforce Server-To-Server API authentication

I'm writing a python application which shows some metrics about an organization. However, I'm running into two problems: There are no service accounts - I need to fetch information from Salesforce ...
1
vote
1answer
645 views

Salesforce No_Oauth_State, State not valid

I'm using Open Id for Salesforce, I followed the Doc from https://help.salesforce.com/articleView?id=sso_provider_azure.htm and could able to login to Salesforce using Azure AD credentials ...
5
votes
1answer
171 views

Unusual OAuth JWT Bearer Token Flow (Outbound) Integration Pattern

I have a client who's asking me to configure an OAuth JWT Bearer Token integration for them to retrieve delivery status information from a supplier. Salesforce is not the idP. Instead, the flow is ...
0
votes
1answer
73 views

Password OAuth Flow (cURL + Connected App) keeps returning Authentication error

We are currently using the following command to generate a token, however the server keeps returning an error. Command: curl -v https://{instance}.salesforce.com/services/oauth2/token -d "...
0
votes
1answer
48 views

Unable to access callout resources due to “invalid issuer or signature”

I'm trying to troubleshoot an error message I keep receiving when I attempt an Apex REST callout and I can't tell if the issue is with my Salesforce or my third-party. When I check out the Named ...
0
votes
0answers
73 views

Canvas Node.js app Authentication with nforce

I am building a simple canvas node.js app that is hosted on Heroku. All the app needs to do at this point is make a REST API call and display the Users of an org. I am using nforce. The following code ...
0
votes
1answer
186 views

Receiving invalid error messages in Apex for failing to specify a refresh token (Oauth2)

I'm running into an issue where I am receiving error messages after starting the authentication flow in my Named Credential and Apex code where my authentication provider didn't receive a refresh ...
-1
votes
2answers
829 views

How to get access_token without UserName and Password?

I have written this Apex code to get access token: private static OAuth getAccessToken(){ try{ HttpRequest req = new HttpRequest(); req.setEndpoint(ENP_POINT_URL); req....
0
votes
0answers
38 views

Rest API Queries from Cordova iOS failed in Salesforce Mobile SDK 6.1 and force.js

I've migrated my cordova hybrid local app from salesforce mobile sdk 4.3 to 6.1. I've changed/modified following implementations during this migration activity: forcetk.mobilesdk.js is replaced with ...