39 votes
Accepted

Authentication using JWT

In the JWT Bearer OAuth flow, the connected app is identified by the connected app's consumer key (provided in the "iss" parameter of the JWT claims). Pre-authorizing users has very little to do with ...
user avatar
  • 48.1k
28 votes
Accepted

Connected App - avoiding a limit on a number of issued tokens + token expiration

I see you've discovered most of this for yourself, but I had this drafted, so I thought I'd post it also, in case it fills in any gaps. From the docs on connected apps: An application may be ...
user avatar
  • 16.2k
25 votes
Accepted

How can I deploy a connected app from my sandbox environment to my production environment?

One organization acts as the "host" of the connected app. All other orgs will automatically "install" it on the first use in that org. There's no need to package it up or deploy it anywhere. If you ...
user avatar
  • 433k
21 votes
Accepted

Where do I find the client id and client secret of an existing connected app?

Just navigate Name > Setup > Create > apps and then click on the app you need. The page you load will contain those information under API (Enable OAuth Settings).
user avatar
  • 6,161
21 votes
Accepted

When does it make sense to add a Connected App to a Managed Package?

Packaging the connected app allows administrators who install the app to control which of their users can use the application. Rather than the coarse ability to block or not block an app (seen in ...
user avatar
  • 2,499
18 votes

Connected App - avoiding a limit on a number of issued tokens + token expiration

https://help.salesforce.com/apex/HTViewHelpDoc?id=remoteaccess_request_manage.htm An application may be listed more than once. Each time you grant access to an application, it obtains a new access ...
user avatar
  • 1,325
15 votes
Accepted

How to specify "Admin Approved" users for a Connected App?

http://www.salesforce.com/us/developer/docs/platform_connect/Content/quick_start_config_who_can_access_canvas_app.htm In your connected application you will see related list where you can configure ...
user avatar
15 votes

Where do I find the client id and client secret of an existing connected app?

In the Enterprise edition I am using, to find the client id and secret for an existing app, I had to go to Setup > App Manager > Down Arrow next to app name > View > look under 'API (Enable OAuth ...
user avatar
14 votes
Accepted

Can't delete Connected App

You should be able to delete the Connected App by going into the app itself: Setup -> Create -> Apps -> Click on the Connected App -> Delete
user avatar
12 votes
Accepted

Salesforce Canvas cross-domain issue

This is a long answer that attempts to explain exactly what's going on here, and how HTML5 and the Force.com Canvas SDK allow safe cross-origin access. It may be that your issue has no solution, but ...
user avatar
  • 16.2k
11 votes
Accepted

"New" button missing from Connected Apps

Easy cookie :) you are looking under Manage Apps. The doc says look for Apps, if you search in the quick find you should see Apps under the create menu Go to setup --> Create --> Apps --> Connected ...
user avatar
  • 16.5k
11 votes
Accepted

Authentication Failure when submitting Authorization Code in OAuth Web-Server Flow

Are you copying your authorization code from browser redirect? Its getting URL encoded and hence its saying invalid authorization code. Check if your auth code is ending with "%3D%3D" replace that ...
user avatar
9 votes
Accepted

Pre authorize a connected app

Yes, administrators can "pre-authorize" an app. Go to the connected app settings (Settings > Manage Apps > Connected Apps), and under the OAuth Policies section, choose "Admin approved users are pre-...
user avatar
  • 433k
9 votes
Accepted

How to further limit OAuth API scope access

This might not be what you're looking for, but I felt like I should float the idea out there anyways. One good restrictive OAuth Scope is: Provide access to custom applications (visualforce). With ...
user avatar
  • 12.2k
8 votes
Accepted

OAuth Connected App without Identity Provider Enabled

No, setting up an identity provider isn't necessary to use an oauth connected app. Just create your connected app and use the supplied client id/secret to handle the login.
user avatar
8 votes
Accepted

Connected App built in SANDBOX has access to PROD

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 ...
user avatar
8 votes
Accepted

OAuth 2.0 access token request failed with error "must use HTTP POST"

Problem is with domain name used in url. :| Using the domain as in "Setup > My Domain" fixed the issue. I have used : https://testOrg.lightning.force.com/ (Did not work) Supposed to be: ...
user avatar
  • 643
8 votes
Accepted

Is it possible to programmatically change connectedApp settings in production?

In short, yes, you're on a fool's errand. The general rule is that you can't package any settings that would allow granting 'system' permissions. That is, permissions that affect more than just the ...
user avatar
  • 2,325
8 votes
Accepted

What's the purpose of the SalesforceDX Namespace Registry Connected App?

The Namespace Registry Connected App is the Connected App under which your Dev Hub authorizes to your packaging org. Completing this linkage allows your Dev Hub to spin up namespaced scratch orgs ...
user avatar
  • 86.8k
8 votes
Accepted

Retrieve standard and custom notifications of a user in Apex

Unfortunately, no. The endpoint you're using seems exactly what you want/need - but, as you noted, will only give you custom notifications. You can see this older question that mentions the lack of ...
user avatar
7 votes
Accepted

How to distribute an app independent of salesforce org

As a developer, you only need to create the connected app once, in a Developer Edition. You publish your app, and it's good to go. You do not need to create a connected app configuration in any other ...
user avatar
  • 16.2k
7 votes
Accepted

Canvas App started sending GET instead of POST

See Signed Request Authentication. Has: a change been made to the Permitted Users field from "Admin approved users are pre-authorized" to "All users may self-authorize", or when using "All users ...
user avatar
7 votes

how to access a connected app from another org

A connected app is much like an "app" on Facebook. The actual app exists elsewhere, but authenticates with Facebook to retrieve database information (e.g. your friends, date of birth, and email). ...
user avatar
  • 433k
7 votes
Accepted

Expose Lightning App via Sites (and embed via Canvas)

Embedding a Lightning .app is totally possible using any iframe based approach including Canvas. This is embedding a single page app though which is a very course grained approach which might be fine ...
user avatar
  • 9,974
7 votes

OAuth2 JWT Bearer token flow - "error": "invalid_client", "error_description": "invalid client credentials"

The problem was the certificate uploaded in the Digital Certificate/Digital Signature field of the connected app. After uploading the proper certificate, the access token is returned.
user avatar
  • 362
7 votes
Accepted

Package Connected App

Packaging a Connected App is a legacy feature that was initially required in order to use them in other orgs. This is no longer a requirement, as the first time it is used in an org, it's ...
user avatar
  • 433k
7 votes
Accepted

How Do You Enable SAML IdP in a Partner Community?

The process is very much similar to how you set up for Internal Users except that you need to replace with Community URLS . Lets look at step by step the mechanism to accomplish the same .For ...
user avatar
7 votes

error=redirect_uri_mismatch&error_description=redirect_uri%20must%20match%20configuration

I had the same problem. I found that callback url in the connected app should be the same as you have in your redirect_uri. I tested it with a tool called postman, maybe that can help you as well.
user avatar
6 votes

When does it make sense to add a Connected App to a Managed Package?

Let's say that you have a salesforce application that communicates with an API you've developed. That API connects to salesforce using the Consumer Secret and Consumer Key of your connected app, and ...
user avatar
6 votes

Setting Up JWT oAuth Flow

just as an FYI: you could have avoided the manual login if you had set the policy settings to: Permitted Users: Admin approved users are pre-authorized and then assigned the Connected App to the ...
user avatar

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