Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Create a Self-Signed Certificate in Salesforce to associate with your connected app.

    1. Setup > Quick Find “Certificate” > Certificate and Key Management

    2. Click “Create Self-Signed Certificate”

    3. Enter a name in the Label and Unique Name fields. Note this down for use later.

    4. Ensure “Exportable Private Key” is selected

    5. Ensure “Key Size” is 2048

      Image RemovedImage Added
    6. Click “Save” to continue to the next page.

    7. Click “Download Certificate” to get the .crt file we will use for the connected app.

  2. Create the connected app in your target org:

    1. Setup > Quick Find “Apps” > App Manager > New Connected App

    2. Enter a name and email for the app

    3. Enable OAuth Settings

    4. Enter a Callback URL (https://www.google.com will work if needed)

    5. Ensure ‘Use digital signatures’ is selected.

    6. Upload the certificate .crt file that was just downloaded.

    7. Under Available OAuth Scopes, add the following:

      1. Access and manage your data (api)

      2. Perform requests on your behalf at any time (refresh_token, offline_access)

    8. Leave everything else with the default options, click Save.

      Image RemovedImage Added

    9. Note that it may take up to 10 minutes for the app to work. Click Continue.

    10. Note down the “Consumer Key” value that was generated, to be used later. Pasting it into a sticky note might be a good idea.

    11. Click “Manage”

    12. Click “Edit Policies”

    13. Under OAuth Policies, set Permitted Users to “Admin approved users are pre-authorized”.

    14. Save.

    15. Now go down and click on “Manage Profiles”. Add the profiles that you want to be able to use login with the Bearer flow, and Save. For me, selecting System Administrator was enough to allow login.

  3. Export the connected app’s certificate:

    1. Setup > Quick Find “Certificate” > Certificate and Key Management

    2. Click “Export to Keystore”. Enter a password. Note this down as ‘source password’.[1]

    3. Click “Export”. A Java Key Store file will be downloaded.
      Next, we need to convert this file to a format that Windows recognises.

...