Access requirements
Expand to view access requirements for the functionality in this article.
You must have the following access to perform the steps in this article:
For more detail about the information in this table, see Access requirements in Workfront documentation.
OAuth2 overview
Imagine that an application must pull some specific information from Workfront. An application that requests information is called a client. For this example, the client name is ClientApp. ClientApp needs access to a particular user’s information, and therefore must access Workfront as that user. If your user gives ClientApp their username and password, ClientApp could access all of the data that the user can access. This is a security risk, because ClientApp only needs a small, specific set of information.
When you create an OAuth2 app for ClientApp, you are essentially telling Workfront that ClientApp is allowed to access Workfront, but only if the user whose account ClientApp is accessing gives permission for the access.
Create an OAuth2 application
When creating an OAuth2 application, choose the type of application that best meets the needs of your integration.
Application type | Best for | Authentication method |
---|---|---|
Machine to Machine Application |
Best for CLIs, daemons, or scripts running on your server Examples:
| Authentication through JSON Web Token with public/private key-pair encoding. |
Single Page Web Application |
Best for mobile or single-page web applications Examples:
| Authentication through OAuth 2.0 Authorization Code flow with Proof Key for Code Exchange (PKCE). |
Web Application |
Best for server-side applications that handle credentials and tokens on the server Examples:
| Authentication through OAuth 2.0 Authorization Code flow. |
Create an OAuth2 application using server authentication (JWT flow)
-
Click the Main Menu icon
-
In the left navigation panel, click System, then select OAuth2 Applications.
-
Click Create app integration.
The New OAuth2 application box displays. -
In the New OAuth2 application box, select Machine to Machine Application.
-
Enter a name for the new application, such as “Workfront for ClientApp.”
-
Click Create.
-
Fill in the fields for the new app.
-
Click Save.
For instructions on configuring and using the OAuth2 application with user credentials (authorization code flow), see Configure and use your organization’s custom OAuth 2 applications using JWT flow.
Create an OAuth2 application using user credentials (Authorization code flow)
https://app.workfrontfusion.com/oauth/cb/workfront-workfront
https://app-eu.workfrontfusion.com/oauth/cb/workfront-workfront
(EU Data center)https://app-az.workfrontfusion.com/oauth/cb/workfront-workfront
(Azure Data Center)
-
Click the Main Menu icon
-
In the left navigation panel, click System, then select OAuth2 Applications.
-
Click Create app integration.
The New OAuth2 application displays.
-
In the New OAuth2 application box, select Web Application.
-
Enter a name for the new OAuth2 application, such as “Workfront for ClientApp.”
-
Click Create.
-
Fill in the fields for the new app.
-
Click Save.
For instructions on configuring and using the OAuth2 application with user credentials (authorization code flow), see Configure and use your organization’s custom OAuth 2 applications using authorization code flow.
Create an OAuth2 single-page web application using PKCE
-
Click the Main Menu icon
-
In the left navigation panel, click System, then select OAuth2 Applications.
-
Click Create app integration.
The New OAuth2 application box displays.
-
In the New OAuth2 application box, select Single Page Web Application.
-
Enter a name for the new OAuth2 application, such as “Workfront for ClientApp.”
-
Click Create.
-
Fill in the fields for the new app.
-
Click Save.
Configure and use the created OAuth2 application
Further configuration and use of the created OAuth2 application requires some technical knowledge, including API calls.
- For instructions on configuring and using the OAuth2 application with user credentials (authorization code flow), see Configure and use your organization’s custom OAuth 2 applications using authorization code flow.
- For instructions on configuring and using the OAuth2 application using server authentication (JWT flow), see Configure and use your organization’s custom OAuth 2 applications using JWT flow.
- For instructions on configuring and using the OAuth2 application using PKCE, see Configure and use your organization’s custom OAuth 2 applications using PKCE flow.
OAuth2 processes for authorization code flow
Authorizing with an authorization code and access token
-
ClientApp needs some information from Workfront, so it sends a request to the Workfront API
/authorize
endpoint. The request includes the response_typecode
, which indicates that the request should return an authorization code. -
This triggers Workfront to send an authentication prompt to the user. The user can enter their credentials into the prompt, which gives Workfront permission to communicate with ClientApp. If the user is already logged into Workfront, this step may be skipped.
-
The Workfront API sends an authorization code to ClientApp.
-
ClientApp sends the following information in a request to the Workfront API
/token
endpoint:- The authorization code sent to ClientApp in step 3. This identifies the specific instance of user permission.
- The Client Secret that was generated when you set up the ClientApp OAuth2 app in Workfront. This allows Workfront to know that the request is coming from ClientApp.
-
If the authorization code and the client secret are correct, Workfront sends an access token to ClientApp. This access token is sent directly from Workfront to ClientApp, and cannot be viewed, copied, or used by any other user or client application.
-
ClientApp sends the access token to Workfront along with the specific request for information.
-
Because the access token is correct, Workfront sends the information to ClientApp.