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 [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.

1
vote
0answers
16 views

Salesforce OAuth2 Custom Attributes / Claims

I'm having trouble getting a custom claim attribute to come through in the id_token. I've got the scope set to OpenId and profile (both in salesforce, AWS Cognito and the URL). I've added the custom ...
2
votes
1answer
35 views

Need to call salesforce API from external system [on hold]

I am creating an external app, where I need to get the data from Salesforce. I understand the use of Connected apps, and I won't be using the web based OAuth flow where user is redirected to https://...
0
votes
1answer
12 views

How to make a oauth authentication from salesforce mobile app? Web Tabs are not showing Allow Access? Pop up (iFrame Issue)

I have done a Device Flow Oauth using a ESP8266. Now i want to have the salesforce mobile app to authenticate my IoT device into salesforce. When the IoT device generates a OTP(User_Code), I open ...
0
votes
0answers
16 views

OAuth User-Agent Flow redirecting to a blank browser window

I'm trying to set up a chrome extension to talk to salesforce. I've set up a connected app with a callback url of 'chrome-extension://jifheclheidfillfkjkgngocmbiaollm/options.html' I'm using the ...
0
votes
1answer
19 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 ...
0
votes
1answer
29 views

Consume external REST API user-aware (without having to re-login)

I have an Apex class that is consuming a partners REST webservices. Currently all users of my app (in the installed org) access the service via a single API Integration user. We now want make the ...
0
votes
0answers
18 views

Deleting Connected App Impact

If I delete a Connected App which is associated with a hybrid Mobile App then will I be able to use the mobile app for login and API calls? I am able to successfully use the Mobile App (Login/API's/...
0
votes
1answer
13 views

What redirect URL we need to set to get google app oAuth token in salesforce apex?

Is there any way to put some static OR intermediate redirect URL for the google app redirect URL instead of this (https://ap1.salesforce.com/apex/GoogleAuth) hardcoded salesforce VF page URL. We are ...
0
votes
1answer
48 views

Named credential for gotoWebinar app (oauth v2.0)

Is it possible? I'm trying to do it but had some errors My steps where: 1) Create the app in the Developer Center. On the Application URL I left the suggestion https://api.getgo.com (I guess this ...
5
votes
1answer
143 views

Can I use an OAuth 2.0 token for API Integration in Enhanced Packages in the Soap API fueloauth token header

In Salesforce marketing cloud I have an installed package with an API integration. I am in the process of moving from the old OAuth token created via https://auth.exacttargetapis.com/v1/requestToken ...
0
votes
1answer
21 views

Which grant type to use when Third party is accessing salesforce [closed]

We have written the code in Salesforce and third party is accessing the data using REST. Currently they are using grant type=password to access Salesforce resources. Since it requires username and ...
0
votes
0answers
11 views

Authenticate and expose external azure report on an iFrame in Communities

I am trying to figure the best way of doing this. We have a report that gets generated in Azure that has customer details. What needs to happen is, when a customer logs into SF Communities, we ...
0
votes
1answer
22 views

Salesforce JWT Token for automation/background process

This is about JTW token for which my understanding is it last for long and can be used in automation/background process. For one of the project I generated the JWT token (https://help.salesforce.com/...
0
votes
1answer
32 views

Salesforce Integration with External System

I'm trying to develop an "oauth" integration for an app to be included on appexchange. Based on other applications that use the same protocol, I could not figure out where the "client id" is taken ...
1
vote
3answers
50 views

Login to salesforce with oauth 2.0 directly from external app using ajax

I want to be able to login directly from my .net application's login (without having to use the user's security token). And I was wondering if it was possible to send my username and password to the ...
2
votes
1answer
29 views

How do I install and preauthorize app so I can use the JWT Bearer token flow?

I'm trying to follow the instructions in https://help.salesforce.com/articleView?id=remoteaccess_oauth_jwt_flow.htm&type=5 and get an invalid request with an error description of "refresh_token ...
1
vote
1answer
26 views

JWT authentication without a username?

I'm working on a managed package that needs to allow an external web service to call an Apex REST endpoint within the package. As far as I'm able to gather, the best route is to use OAuth2 JWT ...
1
vote
2answers
30 views

How to get the Connected App used from an Apex trigger [duplicate]

I have an Apex Job that is being triggered from an 'afterInsert' trigger, but I don't want that Job to be executed if the insert is being performed by a specific external application. I just need to ...
2
votes
0answers
30 views

Authenticate Connected App (Mobile) with Single Sign on

I have a mobile app that uses OAuth to login users. That part works really well, but recently I was asked to make it work for SSO (Single Sing-On). The app as it is has a weird behavior. To be able to ...
1
vote
0answers
16 views

How is consumer secret key adding security to Oauth 2.0? [duplicate]

I am trying to understand what additional security the the consumer secret(client_secret) for OAuth 2.0 provides. If one want to avoid using the consumer secret when authenticating you can use the ...
0
votes
0answers
19 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
41 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
44 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
14 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
34 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
35 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
72 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
35 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
155 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
33 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
248 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
2answers
171 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
251 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
93 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
24 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
48 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 ...
2
votes
1answer
99 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
79 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
93 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
127 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
59 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
54 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
76 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
35 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
18 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
245 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
36 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
20 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
100 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 ...