12

From the Salesforce OAuth JWT Flow documentation (hidden): A JWT OAuth 2.0 bearer assertion request looks at all the previous approvals for the user that include a refresh_token. If matching approvals are found, the values of the approved scopes are combined and an access_token is issued (with "token_type" value "Bearer"). If no previous ...


7

For either the sub or prn value, make sure you are using a username that exists in that org. For the aud make sure you are using test.salesforce.com for a sandbox environment and login.salesforce.com for production. The issuer (iss) must be the OAuth client_id or the connected app for which the developer registered their certificate. String iss = ...


7

This is a feature of OAuth, and is working as designed. A connected app clientId and secret can be used to connect to any org provided you go through oauth flow and enter username and password (or alternatively provide them using the username-password flow). Note that you will still need username and password for the PROD and cannot access anything allowed ...


6

I just went through something similar where the final destination varied depending on the customer so a static callback int he code did not work. What I did on our LMA org to handle this was: Placed the connected app within the LMA org Added a VF page and code to handle the callback on a force.com site Added the URL of the callback on the connected app for ...


5

If integration APIs are creating the record with its unique external ID, the field does not need to be required. Just make it read-only in the layout. If you are concerned that users may create these records manually, set up the permissions so that only the integration API process (and maybe admins) have permission to create this object type.


5

Public Read/Write doesn't imply Delete. Check your profile settings. https://help.salesforce.com/HTViewHelpDoc?id=sol_del.htm&language=en_US


4

Navigate to Communities | Builder Now observe the URL .Remove of all the extra parameters after domain.The URL would look like below https://googleflowauth-dev-ed--sitestudio.ap1.force.com/ This will open the site.com Studio for you using builder .


4

You don't need the Visualforce page. UserInfo.getSessionID() still works, you just cannot System.debug() a session ID - the logs will show SESSION_ID_REMOVED. Your 401 error usually indicates that you have not created a Remote Site Setting for the instance your code is running on. Make sure to create a Remote Site Setting for https://ckdomaintest-dev-ed.my....


4

Expanding on my comment: The JWT Oauth flow may be what you want, if you're operating a headless back-end application with no user interface. With the JWT flow, you'll create a Connected App in Salesforce and pre-authorize specific Profiles or Permission Sets to connect without any further user-mediated approvals. The Connected App will be seeded with a ...


4

Most of us have this issue with Authorization command. Something may be broken in cli. One workaround is with this command: // authorize production org sfdx auth:device:login // authorize sandbox sfdx auth:device:login -r https://test.salesforce.com // authorize devhub sfdx auth:device:login -d -a <devhub alias> Here is the link to related issue in ...


3

The URI is: https://auth.exacttargetapis.com/v1/requestToken Straight from the docs the whole POST must be as follows :) POST https://auth.exacttargetapis.com/v1/requestToken Content-Type: application/json { "clientId": "YOUR_CLIENT_ID", "clientSecret": "YOUR_CLIENT_SECRET" } 200 OK { "accessToken": "YOUR_ACCESS_TOKEN" "expiresIn": 3600 }


3

I am having the same problem with named credentials, and I think I have figured out what's going on. I used Runscope to inspect the headers which are being sent with the HTTP callout. It turns out that the value of the "Authorization" header is not being prefixed with the word "Basic". For example, if your username is "abc" and your password is "123", ...


3

read once again information about master-detail relationship. try here http://www.salesforce.com/us/developer/docs/api/Content/relationships_among_objects.htm here is some tip: check sharing and security :)


3

First thing you can identify is the OWD setting for the objects, using the most restricted user in the requirement. Then try to eliminate the options which does not fit OWD setting. I hope this helps.


2

Lookups relationships can be set to cascade delete. For a ton of information about the different types of relationships in Salesforce, read this help article: http://help.salesforce.com/HTViewHelpDoc?id=relationships_considerations.htm&language=en_US


2

The question doesn't contain a lot of details, but to my knowledge there are 3 high level directions you can investigate in. 1) private sharing models and (apex based) sharing rules. I think this is what you'll want to do. 2) Territory management, this is a salesforce feature. 3) multiple salesforce orgs, possible with integration set up where needed, and ...


2

I'm not certain if this applies to your situation or not, but I strongly suspect it does. See Knowledge Article Number: 000214836 Integration Options for Salesforce files With the Summer '15 release there are several integration options for Salesforce Files and external systems: Files Sync - this allows bidirection synchronization of files from ...


2

Your understanding is correct. We take the authorization code from the page URL and use it to exchange for the authorization token and refresh token This exchange of the code for tokens is "webserver to webserver" from Salesforce to Google via Apex HTTPRequest callout. This is how you secure your client secret from prying eyes. Once I have ...


2

"user hasn't approved this consumer" This is a common error caused when the user doesn't have a prior refresh_token associated with him/her. The solution is to perform an Autorization grant (Web Server flow or User-Agent Flow) at least once. I wrote in detail about it; look specifically at step #3 here - https://mannharleen.github.io/2020-03-03-...


2

"user hasn't approved this consumer" This is a common error caused when the user doesn't have a prior refresh_token associated with him/her. The solution is to perform an Autorization grant (Web Server flow or User-Agent Flow) at least once. I wrote in detail about it; look specifically at step #3 here - https://mannharleen.github.io/2020-03-03-salesforce-...


2

Specify both scopes: scope: "refresh_token full", The scope parameter is a space-delimited list of scopes you would like to request. You can specify as many scopes as you need to be as granular as you'd like. The parameter needs to be encoded using the method outlined in this help topic.


2

You definitely can't control it from Salesforce's end; Salesforce checks authentication very early in the stack process, before any code you could possibly write could run. Your ideal situation would be to configure the third party system to not do this. Otherwise, you could also use an ESB (Enterprise Server Bus) to strip out the header (at least, any ...


2

There's going to be at least two calls involved unless you use webhook-style authentication on a Apex REST API endpoint exposed to the public through a Force.com Site. With that style of authentication, you accept input from any caller in an unauthenticated session, and authenticate it through an HMAC with a pre-shared secret key. The running user for your ...


2

I had the same error since a few days. Simply doing a "sfdx update" in the command line solved the problem for me... Currently I'm on sfdx-cli version 7.88.4 (sfdx --version)


1

tl;dr: No on both questions. Your external user is just going to need to suck it up and make the changes. The documentation you linked doesn't go into detail about exactly what it means by "the connected app", but I suspect it means the API name of your connected app. I would be very surprised if you could use the client_id of any OAuth enabled ...


1

Found the problem! I had a typo in my token request. It should have been "client_secret" instead of "secret". so it should be: request.AddParameter("application/x-www-form-urlencoded", $"grant_type=authorization_code&code={code}&client_id={ClientId}&client_secret={Secret}&redirect_uri={AuthCallback}", ...


1

I was running into a similar issue. If you are doing a GET call make sure you don't append a body or your request will NOT work with even with the correct headers. If you are doing a POST the easiest was to append parameters is through the body. Try feeding the username and password variables into a String before assigning them to setHeader values. Also ...


1

I was having the same issue, but I needed the username and password in the body of the request, I solved this by assigning the merge fields to string variables, then put the variables with all the other body content. You have to be aware that when you debug the variables or the body you will see the merge field '{!$Credential.UserName}' .... and not the ...


1

If you add the <site:previewAsAdmin /> tag to your site template, then visit Develop > Sites > Name of Site > Preview as Admin you will be able to see on-screen error messages that would otherwise not be visible to your end users. This can greatly speed up your debug time. More info on the tag is available in the Visualforce Docs: https://developer....


1

If you are an admin, maybe the edit button is overridden and you do not have access to the VF page it is redirecting to? Setup -> Develop -> Pages / Visualforce Pages -> Find the page Click Security Add your profile to the list on the right


Only top voted, non community-wiki answers of a minimum length are eligible