Questions tagged [authentication]

Relating to the mechanisms for user authentication and verification. There are many potential approaches to authentication on the salesforce platform.

6
votes
1answer
3k views

Should OAuth2 with grant_type “password” work for “High Volume Customer Portal” users?

I am using the "/services/oauth2/token" end point with grant_type "password" (and with client_id, client_secret, username, password) from JavaScript code. With "IP Restrictions" set to "Relax IP ...
5
votes
1answer
3k views

How to connect to Salesforce REST API without OAuth? How does Jitterbit do it?

So what I read everywhere is that, in order to connect to Salesforce via the API, you'll have to authenticate using OAuth. But this involves creating a Connected App, which is 'cumbersome' for normal ...
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 ...
22
votes
3answers
37k views

How does a user with SAML SSO get redirected to IDP login page?

Question When SSO has been configured for SAML 2.0 and a user's federation identifier has been populated, how do they get redirected to the Identity Provider's login page? Background I'm working to ...
4
votes
1answer
3k views

Salesforce REST API authentication?

I feel like this should be really easy to do, but I can't find anything about it on the web. Is there a way, through either javascript or a java web servlet, to skip the subsequent authentication? We ...
3
votes
2answers
3k views

Authorization Required

I have created simple site that create a new case. Note : I have given the Site permissions Visualforce page,Controller ,Lead Object and Case Object. While execute the site Lead is created ...
2
votes
1answer
2k views

When to use username & password flow to obtain a token

One of ways to get an access_token to use with SFDC Rest Api is to use the Username and password flow, where you use both of these to get an access_token. Its documented here: https://developer....
7
votes
1answer
2k views

OAuth 2.0 JWT Bearer Token Flow giving a user hasn't approved this consumer error

I have setup a connected app and want to use the OAuth JWT. Based on my understanding of the salesforce documentation only preauthorized client can use this flow to get an access token. I have ...
3
votes
1answer
1k views

Authorization header missing from RestRequest headers map

I have a publicly exposed web service (Rest Apex) through Sites and I'd like to do basic authentication which I will manage myself. I noticed that when I specify Authorization: Basic ...
6
votes
1answer
876 views

Server to Server JWT Authentication Certificate management

I'm writing an application to sync some data from a service to salesforce and back. I'm working with a developer account and so far I was able to implement the bulk of the needed functionality merely ...
4
votes
1answer
7k views

How to integrate external web app?

After reading Force.com Canvas Developer's Guide, I don't think I have figured out a good way to integrate an external web app inside salesforce.com. Following are questions that I am not sure about. ...
22
votes
6answers
4k views

How to roll your own authentication for an external Salesforce App?

Background If you're building an app, that involves Doing some very basic actions on behalf of non-Salesforce users, i.e. creating a Quote Is hosted externally (in other words, not APEX, but rather ...
9
votes
3answers
3k views

Two factor authentication for Community Users

It looks like standard two factor authentication is not available for community users. Does anybody know a work-around for this?
1
vote
1answer
39k views

“unsupported_grant_type” error when trying to authenticate

I am using the following code to try to get an authenticate. This is in C#, using the RestSharp library: public string GetAuthToken(string code) { var client = new RestClient("https://login....
6
votes
1answer
913 views

Long-running sessions for customer portal

For our customers, I'd like to allow them to stay logged in to our customer portal/authenticated site similar to what Amazon does. Goal is to reduce the number of times they have to "do anything" ...
6
votes
1answer
3k views

Custom Login Page and URL - what was delivered?

This idea https://success.salesforce.com/ideaView?id=08730000000BqQmAAK requesting the ability to be able to define a custom login page (e.g. with you own branding) is marked as "delivered" but with ...
5
votes
1answer
2k views

OAuth 2.0 JWT Bearer Token Flow

I'm trying to perform the OAuth 2.0 JWT Bearer Token Flow: https://help.salesforce.com/HTViewHelpDoc?id=remoteaccess_oauth_jwt_flow.htm&language=en_US But I'm having this issue: {"...
5
votes
1answer
2k views

Bypassing RemoteAccessAuthorizationPage when using a remote application?

Hey guys I had a dream last night about a huge issue in our ability to aggregate data. After setting up a remote app, using PHP to "CURL" into login.salesforce.com for authorization, we hit the ...
5
votes
1answer
1k views

frontdoor.jsp for Customer Portal user? How to authenticate a portal user with session id?

authenticate a customer portal using SOAP login() method and LoginScopeHeader receive SessionID in LoginResult object How can I use SessionID to redirect the user's browser to the customer portal and ...
2
votes
1answer
215 views

How does Salesforce handle or use the state parameter on an oauth callback?

Running into an issue with our Open ID Connect Authentication Provider. The current way our registration page has been implemented requires a unique identifier to be passed through the state parameter ...
2
votes
1answer
426 views

Where can i find the header information in a webservice callout request?

we are integrating Salesforce and SAP systems. For that we are making a callout to SAP with username and password in the header. When i checked the debug log the callout_request entry contains an xml ...
1
vote
1answer
412 views

Getting Metadata API server URL when using OAuth flow

I'm trying to interact with Metadata API from Python, for multiple different Salesforce accounts / organizations. I'm using OAuth flow so nobody needs to give me their username + password, and can ...
1
vote
2answers
3k views

SOAP-API authentication

I am trying to implement SOAP-API for Java and find that the authentication is 2 step using the REST and then passing the token in the SOAP header. I also downloaded the example from http://help....
7
votes
2answers
2k views

How do I setup access for a REST resource apex class using session ID

We have a REST resource apex class, and its sole purpose is to eliminate the problem of hitting Salesforce page view limits. The way it is currently setup doesn't seem to be eliminating this issue. ...
5
votes
1answer
3k views

“Unable to resolve request into a Service Provider” return by Salesforce Identity Provider for SAML 2.0 request

I have a Salesforce instance configured to act as an Identity Provider and am trying to connect a (non-Salesforce) Service Provider (client) to it. So we are making a SAML 2.0 samlp:AuthnRequest using ...
4
votes
2answers
2k views

Making rest request with Oauth

I have all four Oauth token consumerKey, consumerSecret, accessKey and accessSecret. I need to make a request to a url from my apex code. Is there any library or a way to make this request. In java I ...
2
votes
2answers
430 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. ...
2
votes
2answers
535 views

JWT Oauth flow Confusion

I am having trouble getting the hang of the JWT Oauth flow and how it exactly works. Is a user supposed to enter their username on your website, which you then generate the JWT on your server and then ...
2
votes
1answer
302 views

how would Force.com Canvas SDK and canvas method “verifyAndDecodeAsJson” work with non-java platform? Is there any workaround?

I am using signed request as the method to POST the data to the canvas app. The canvas app is the SAP BSP page. I now seeing a big road block that I am not able to retrieve the values from the context ...
1
vote
3answers
715 views

Implementing the self-authorization flow of signed request authentication for a canvas app

I'm working on a canvas app which will allow an existing web app to be viewed through canvas. I have the app working with Signed Request authentication, which works fine when permitted users is set ...
1
vote
1answer
2k views

how to renew salesforce CA signed certificate

We have existing web service client on salesforce to call out third party web service with CA signed saleforce certificate. When this certificate is expired, how to renew it from saleforce "...
1
vote
1answer
477 views

getAccessToken is returning null when using Microsoft Access Control Source

I have set up OAuth with Sharepoint by following a Salesforce tutorial. When I go to the Test-Only Initialization URL, I am successfully directed through the OAuth process and end up at the Callback ...
1
vote
3answers
3k views

Forgot password page on visualforce

I have created a visualforce website which allows Authenticated users to login. I have also created a Forgot Password page which utilises the default ForgotPasswordController to do all the logic ...
1
vote
1answer
869 views

Self Singed Certificate for Mutual TLS

I need to expose an rest api to an external system, and wanted to allow authentication only through certificate. So as per the salesforce mutual tls feature can we use self signed certificate ...
0
votes
1answer
109 views

Is this a good mix: Authenticated Site - Customer Portal License - Opportunities

I have: Parent__c object which parents the opportunity object. Authenticated site for customers to login. Authentication comes via Customer Portal license. One of the pages in the site details the ...
0
votes
1answer
2k views

Authorization PHP Curl returns Login page instead of token

I am trying to use PHP curl to authenticate my app's user, but instead of authenticating with OAuth it returns the actual html login form as a response. Why? I don't want to redirect the user over and ...
0
votes
1answer
231 views

2 Factor Authentication is not being triggered with Single Sign On (OpenID Connect)

Testing SSO against Azure AD using openId connect per this developer.force.com documentation Two-factor authentication is already configured and functions properly for username + password login. ...
0
votes
1answer
199 views

Salesforce canvas App using OAuth JWT 2.0 Bearer flow

We are trying to build a POC on integrating Salesforce with a third party portal using canvas app. We have to embed this portal into Salesforce when a user logs into Salesforce. We have a local portal ...