TABLE OF CONTENTS
- Introduction
- At a glance
- What to ask your P6 administrator for
- Open the connector wizard
- Step 1: General
- Step 2: Components
- Step 3: Authentication
- Step 4: Settings
- Step 5: Complete, test and persist
- Messages and what to do
- Questions and answers
- Related articles
Introduction
This article shows you, step by step, how to create a Primavera P6 REST API connector. This connector lets SchedEx exchange schedules with Oracle Primavera P6 EPPM through P6's newer interface, the P6 EPPM REST API.
Who can do this: a user with the Tenant Setup role in SchedEx.
You do not need to be technical. Most values come from your P6 administrator. Section 2 lists exactly what to ask them for.
Not sure this is the right connector? Read Primavera P6 connectors: overview first. It helps you choose between the REST API and the Web Service, and lists the P6 permissions SchedEx needs. Using the Web Service? See Creating a Primavera P6 Web Service connector.
1. At a glance
Creating the connector takes about five to ten minutes once you have the values from your P6 administrator.
- Ask your P6 administrator for the values in section 2.
- Fill in the five-step wizard in SchedEx (sections 3 to 7).
- Test and persist the connector in the SchedEx desktop client (section 8).
Checklist before you open the wizard:
- I have the P6 REST API address (Base URL). It ends in
/p6ws/restapi. - I have a P6 user name and password, or we sign in to P6 with a Microsoft work account.
- I know whether transfers run on a person's PC (Desktop Client), on a server (Autonomous Component), or both.
- The P6 user has the permissions listed in the overview (section 5 there).
2. What to ask your P6 administrator for
Ask your P6 administrator or IT department for the items below. Tell them that SchedEx will use the P6 EPPM REST API, and whether it will connect from users' PCs (Desktop Client), from a server (Autonomous Component), or both.
| Ask for | Why SchedEx needs it | Where it goes |
|---|---|---|
The P6 REST API address. It ends in /p6ws/restapi. |
So SchedEx can find your P6. | Step 3: Base URL |
| A P6 user name and password for SchedEx, ideally a service account whose password does not expire. | So SchedEx can sign in to P6. | Step 3: Username, Password |
| Whether the server accepts Basic Authentication or the OAuth token API. | The two methods sign in differently. | Step 3: Authentication Method |
| Only if you sign in to P6 with Microsoft work accounts: the Authority, Client ID and Scopes of the Microsoft Entra ID app that protects P6. | Needed for OAuth 2.0 sign-in in the Desktop Client. | Step 3: Authority, Client ID, Scopes |
| Module access to the P6 REST API and the project permissions for that user. Share the overview (section 5) with them. | So SchedEx can read, and if needed write, your projects. | Set up in P6 by the administrator |
| Confirmation that the P6 REST API can be reached from users' PCs or the Autonomous Component's server. | SchedEx connects to P6 directly from there. | Network, set up by IT |
How SchedEx keeps these values safe: the passwords, client secrets and tokens you enter in the wizard are encrypted with AES-256 before SchedEx saves the connector. The encryption key is kept in Azure Key Vault, separate from the database. Custom header values are not encrypted. Read more in Checking your connectors.
3. Open the connector wizard
- Select Setup in the top menu.
- On the Connector List card, select New Connector.
The Setup page. New Connector is on the Connector List card.
The New Connector wizard opens on the right. It has five steps: General, Components, Authentication, Settings and Complete. Every field has an ⓘ icon. Point at it to see a short help text. Next stays grey until every required field on the step is filled in.
4. Step 1: General
| Field | What to enter |
|---|---|
| Connector Name (required) | A name that tells your colleagues which P6 this is, for example P6 Production (REST API). The name is shown everywhere the connector is used, such as in Configs and Exchange Agreements. |
| Host System (required) | Select Primavera P6 REST API. Scroll down the list of host systems to find it. |
| Import from existing (optional) | Copies the settings of a connector you already have, so that you only change what is different. |
Step 1, scrolled down: the Primavera P6 REST API card selected.
Select Next.
5. Step 2: Components
An execution component is the SchedEx program that runs the transfer and talks to P6.
| Option | What it means | Choose it when |
|---|---|---|
| Desktop Client | The SchedEx desktop program on a user's PC. Someone must be signed in to start a transfer. | People start transfers by hand, or you want to sign in with a Microsoft work account. |
| Autonomous Component | A SchedEx service that runs on a server, without a person. | Transfers must run automatically on a schedule. |
You can select both. The connector then gets one sign-in profile for each component, and you fill in both in the next step. They can use different sign-in methods. For example, the Desktop Client can use Microsoft sign-in while the Autonomous Component uses a service account.
Step 2 with both components selected. Step 3 then shows a tab for each one.
SchedEx connects to P6 directly from where the component runs: the user's PC or the Autonomous Component's server. The P6 REST API must be reachable from there.
Select Next.
6. Step 3: Authentication
If you selected both components in Step 2, you see two tabs: Desktop Client and Autonomous Component. Fill in both. The line at the bottom tells you when the other profile is still incomplete, and Switch to … takes you to it.
First choose the Authentication Method: how SchedEx proves to P6 who it is. The fields below the list change to match your choice.
| Method | You enter | Desktop Client | Autonomous Component |
|---|---|---|---|
| Basic Authentication | Base URL, user name and password | Yes | Yes |
| OAuth Token API | Base URL, user name and password | Yes | Yes |
| OAuth 2.0 | Base URL, Authority, Client ID and Scopes | Yes | No |
Base URL (every method)
| Field | What it means | Example |
|---|---|---|
| Base URL (required) | The address of your P6 REST API. It must end in /p6ws/restapi. SchedEx checks this when you save. |
https://p6.yourcompany.com/p6ws/restapi or, for Oracle cloud, https://<host>/<service-instance>/<environment>/p6ws/restapi/ |
Always use an address that starts with
https://. Your sign-in details travel with the requests.
Option A: Basic Authentication
SchedEx sends a P6 user name and password with every request. Works in both components.
Basic Authentication. The bottom line shows that the Autonomous Component tab is not finished yet.
| Field | What it means |
|---|---|
| Username (required) | The P6 user that SchedEx signs in as. |
| Password (required) | The password for that P6 user. SchedEx stores it encrypted. |
Option B: OAuth Token API
Uses the same Username and Password fields as Basic Authentication. The difference is behind the scenes: SchedEx first exchanges the user name and password for a temporary access token from P6, and then uses the token for its requests. It gets a new token about every hour. Works in both components.
OAuth Token API on the Autonomous Component tab.
Basic or OAuth Token API? Use the one your P6 server accepts. Ask your P6 administrator if you are unsure. You can change it later and test again.
Option C: OAuth 2.0 (Microsoft sign-in)
Use this when your organization protects P6 with Microsoft Entra ID, so that you sign in to P6 with your Microsoft work account.
OAuth 2.0: Authority, Client ID and Scopes.
| Field | What it means | Example |
|---|---|---|
| Authority (required) | The Microsoft sign-in address for your organization. | https://login.microsoftonline.com/<your-tenant-id> |
| Client ID (required) | The Application (client) ID of the Entra ID app registered for P6. Found in the Azure portal under App registrations → your app → Overview. | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx |
| Scopes (required) | The permission SchedEx asks for when it signs in. Usually the app's address followed by /.default. |
api://<your-app-id>/.default |
What you will notice: the first time the connector runs, a Microsoft sign-in window opens. Sign in with your work account. The desktop client then remembers the sign-in on your PC, so you are not asked every time. Signing out of the desktop client clears it, and you sign in again next time.
OAuth 2.0 works only in the Desktop Client. The Autonomous Component cannot open a sign-in window. On the Autonomous Component tab, use Basic Authentication or OAuth Token API.
Select Next when all required fields are filled in.
7. Step 4: Settings
All settings on this step are optional. The default values work for most P6 servers. Change them only when you have a reason to.
Step 4: optional settings. The defaults suit most P6 servers.
| Setting | What it means | Default |
|---|---|---|
| Custom Headers | Extra pieces of information that SchedEx sends with every request to P6. Only needed when your IT department has put a gateway in front of P6 that asks for them, for example a subscription key. Select Add to enter a name and a value. See Setting Custom Headers for a Connector. | None |
| Read Batch Size | How many activities SchedEx reads from P6 in one go. For schedules with more than 50,000 activities, a larger value such as 10000 is recommended. Lower it if P6 times out on large reads. |
500 |
| Write Batch Size | How many items SchedEx creates, changes or deletes in P6 in one go when it receives data. Lower it if your P6 server rejects large requests or times out. | 500 |
| Include project level activity codes | P6 has activity codes at global level and at project level. SchedEx always offers global codes for mapping. Switch this on to also offer project-level codes. | Off |
Select Create Connector to save.
Each connector needs its own address. Two connectors cannot use the same Base URL. SchedEx uses the connector to keep track of transferred activities over time, so it stops you from saving a duplicate.
8. Step 5: Complete, test and persist
The last step confirms that the connector is saved. Select View Connector to open it, or Close.
The connector cannot exchange data yet. Two things are left. Both run from the SchedEx desktop client on a PC that can reach P6:
- Test the connector. In the desktop client, open Connectors and select Test on the
connector's row. SchedEx signs in to P6 and reads from it.
- Connected means the address, the sign-in and the network all work.
- Test Failed: followed by a message means something is wrong. See section 9.
- With OAuth 2.0, a Microsoft sign-in window may open during the test.
- Persist the connector. Select Persist on the same row. SchedEx reads the list of projects from P6 and how project codes, activity codes and user-defined fields are set up, so that you can select them in Configs. When it finishes you see Host System data stored successfully!
Persist reads every project the P6 user can see. On a large P6 database this can take a while.
If transfers run on the Autonomous Component
A test in the desktop client runs from your PC. It proves that your PC can reach P6, not that the server where the Autonomous Component runs can. To check the server:
- Persist from the server. In the SchedEx web app, open Setup > Connectors, open the connector and select Persist Within 3 Minutes. The Autonomous Component picks up the request and reads from P6 itself.
- Ask a Tenant Admin to check the dashboard. In Clients > Autonomous Component > Dashboard, the Connectors panel shows each connector's health and its latest persist. The connector should be Healthy and its persist Completed. If it is Unhealthy, point at the error icon to see why. See Reading the Autonomous Component Dashboard.
Check the connector later
In the web app, Setup > Connectors shows every connector's Status and Last Health Check. A connector that has not been checked for more than 7 days is marked as such: run Test again to refresh it. Test and persist again whenever the P6 address, password or projects change.
More about testing and persisting: Testing and Persisting a Connector.
9. Messages and what to do
While you fill in the wizard
| Message | What it means | What to do |
|---|---|---|
| Api base url must be provided | The Base URL is empty. | Enter the address from your P6 administrator. |
| Base URL must follow the format: https://<host>/<service-instance>/<environment>/p6ws/restapi/ | The address does not end in /p6ws/restapi. |
Check the address. It must end in /p6ws/restapi. A / after it is fine. |
| Base URL must be a valid absolute URL | The address is not a complete web address. | Enter the full address, starting with https://. |
| For basic and OAuth token api authentication, username and password must be provided | Username or Password is empty. | Fill in both. |
| For OAuth authentication, authority, client application id and scopes must be provided | OAuth 2.0: one of the three fields is empty. | Fill in Authority, Client ID and Scopes. |
| Next stays grey | A required field is empty or not valid, or the other component's profile is incomplete. | Look for fields marked in red, and check the line at the bottom of the Authentication step. |
When you test, persist or transfer
| Message | What it means | What to do |
|---|---|---|
| Test Failed: with a sign-in or authentication error | P6 does not accept the user name, password or token. | Check the credentials with your P6 administrator. Try the other method (Basic or OAuth Token API). Make sure the user has module access to the P6 REST API. |
| Test Failed: with a message that the server cannot be reached or found | The PC or server cannot reach P6. | Check the Base URL. Check that the PC is on the company network or VPN, if P6 is only reachable there. |
| This connector is no longer available. Refresh the connector list and try again. | The connector was deactivated, or it has no Desktop Client profile. | Refresh the list. To test from the desktop client, make sure Desktop Client is selected in Step 2. |
| This connector test is already running or waiting to start. | A test of this connector is already in progress. | Wait for it to finish. |
| The project with ID … could not be found or read from the service… | The P6 project does not exist, or the user cannot see it. | Make sure the project exists in P6 and the user has access to it. See the overview. |
10. Questions and answers
The P6 password changed. What do I do? Edit the connector in SchedEx, enter the new password on the Authentication step (on each tab that uses it) and save. Then run the test again. Nothing needs to change on users' PCs.
Can the Desktop Client and the Autonomous Component use different sign-ins? Yes. Each gets its own tab in Step 3.
Do I need message encryption? No. Message encryption only exists for the Web Service connector. The REST API relies on HTTPS.
I signed in with OAuth 2.0 as the wrong user. How do I switch? Sign out of the SchedEx desktop client and sign in again. The next test asks you to sign in to Microsoft again.
Can I change the connector later? Yes. Open the connector and edit it. Run the test again after you change the address or the sign-in.
11. Related articles
- Primavera P6 connectors: overview: which connector to choose, P6 permissions and a glossary.
- Creating a Primavera P6 Web Service connector
- Creating, Editing and Copying a Connector
- Testing and Persisting a Connector
- Setting Custom Headers for a Connector
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article