Newer Version Available
Expose Your Connected App as a Canvas App
You can expose your connected app as a canvas app. Canvas apps are available as apps
that your org’s Salesforce admin install or as personal apps that users install across orgs.
Users access a canvas personal app from the Chatter tab, and are prompted to allow the app to
connect to their Salesforce data. Users can choose to make an app a canvas personal app.
| Available in: both Salesforce Classic (not available in all orgs) and Lightning Experience |
| Connected Apps can be created in: Group,
Professional, Enterprise, Performance, Unlimited, and
Developer Editions Connected Apps can be installed in: All Editions |
| User Permissions Needed | |
|---|---|
| To read, create, update, or delete connected apps: | Customize Application AND either Modify All Data OR Manage Connected Apps |
| To update all fields except Profiles, Permission Sets, and Service Provider SAML Attributes: | Customize Application AND either Modify All Data OR Manage Connected Apps |
| To update Profiles, Permission Sets, and Service Provider SAML Attributes: | Customize Application AND Modify All Data AND Manage Profiles and Permission Sets |
| To install and uninstall connected apps: | Customize Application AND either Modify All Data OR Manage Connected Apps |
| To install and uninstall packaged connected apps: | Customize Application AND either Modify All Data OR Manage Connected Apps AND Download AppExchange Packages |
For more information about canvas apps, see the Canvas Developer Guide.
- Create your connected app, and complete its basic information.
- In the Canvas App Setting section, select Canvas to expose your connected app as a canvas app.
- Enter the canvas app URL to the third-party app. The user is directed to this URL when clicking the link to your canvas app.
-
Select an access method to specify how the canvas app initiates the OAuth authorization
flow.
- Signed Request (POST)—OAuth authorization is used, but when Salesforce admins
install the canvas app, they implicitly allow access for users. Users aren’t prompted
to allow apps to access their user information. When you use this access method,
authorization is posted directly to the canvas app URL.
If your canvas app uses signed request authorization, don’t select Perform requests on your behalf at any time for the Selected OAuth Scopes.
- OAuth Webflow (GET)—OAuth authorization is used, and the user is prompted to allow apps to access their information. When you use this access method, the canvas app must initiate the OAuth authorization flow.
- Signed Request (POST)—OAuth authorization is used, but when Salesforce admins
install the canvas app, they implicitly allow access for users. Users aren’t prompted
to allow apps to access their user information. When you use this access method,
authorization is posted directly to the canvas app URL.
-
If you’re using SAML single sign-on (SSO) for canvas app authentication, select the
SAML Initiation Method field. The options for this field include the
following.
- Identity Provider Initiated—Salesforce makes the initial request to start the SSO flow.
- Service Provider Initiated—Canvas app starts the SSO flow after the app is invoked.
-
Under Locations, select where the canvas app appears to users.
- Chatter Feed—Canvas app displays in the feed. If selected, create a CanvasPost feed item and ensure that the current user has access to the canvas app.
- Chatter Tab—Canvas app displays in the app navigation list on the Chatter tab automatically.
- Console—Canvas app displays in the footer or sidebars of the Salesforce console. If selected, you must choose where the canvas app displays in a console by adding it as a custom console component.
- Layouts and Mobile Cards—Canvas app can display on a page layout or a mobile card. If selected, choose where the canvas app displays by adding it to the page layout.
- Mobile Nav—Canvas app is accessible from the navigation menu in the Salesforce app.
- Open CTI—Canvas app displays in the call control tool. If selected, specify the canvas app in your call center’s definition file for it to display.
- Publisher—Canvas app displays in the publisher. If selected, create a canvas custom quick action and add it to the global layout or to an object layout.
- Visualforce Page—Canvas app can display on a Visualforce page. If you add an <apex:canvasApp> component to expose a canvas app on a Visualforce page, be sure to select this location for the canvas app. If you don’t, you receive an error.
-
To create a global action for your canvas app, select Create Actions
Automatically. Under Location, select Publisher.
If you don’t use this option, global actions aren’t created. You can also create the action later.
-
If you implement your own Canvas.CanvasLifecycleHandler Apex class, enter the class name in Lifecycle
Class.
Providing a Canvas.CanvasLifecycleHandler Apex class lets you customize context information and add custom behavior to your canvas app.
-
To let users install your app, select Enable as a Canvas Personal
App. Chatter Tab is the only location that supports canvas personal apps.
- When you’ve configured all settings for your connected app, click Save.