Connecting Using OAuth2

OAuth2 allows EPM Agent Skills to access a selected Oracle Fusion Cloud Enterprise Performance Management environment using an access token instead of sending your password with each request. The shared Auth skill supports three authentication methods:

  • Client ID and Service Instance ID for Oracle sign-in using a device code.
  • Client ID and private refresh token: for renewable access.
  • Private Access token: for direct access until the token expires.

Choosing a Private Configuration Format

Use one of the following configuration formats to provide environment details and authentication information to the agent. For device-code sign-in, specify the Client ID and Service Instance ID. For token-based authentication, specify the path to a private file containing the Client ID and refresh token or only the access token. Supply identifiers and credentials through private files. Do not paste real token values into chat.

Note:

If your application is not configured for OAuth2, use the Core OAuth2 Setup skill. It provides the the client ID, Service Instance ID, refresh token, and access token, which you can then use for your selected authentication method. See OAuth2 Setup Skill in Featues with AI .

Format 1: Client ID and Service Instance ID

EPM Environment URL: <exact HTTPS URL of your Cloud EPM environment>
EPM Environment Name: <symbolic short name to refer to this environment, such as EPM Test>
Client ID: <OAuth2 client ID>
Service Instance ID: <service instance ID for this environment>

Use this format to complete Oracle sign-in in a browser. The public application must support the Device Code and Refresh Token grants and allow requests for the selected EPM resource scope and offline_access. The service must allow token refresh and have the required audience configuration.

The agent displays an Oracle verification link and a short sign-in code. Open the link, enter the code, and complete sign-in, including any required multifactor authentication (MFA). Do not provide your Oracle password, MFA response, or private device code to the agent.

The shared Auth skill discovers the validated Identity Domain when necessary, requests tokens through the supported device flow, and saves the refresh token and initial access token in private session storage.

Use the Service Instance ID for the selected environment. Do not use an example ID or an ID from another environment.

Example prompt:

Use device-code OAuth2 for EPM Test with the Client ID and Service
Instance ID in my selected private configuration. Give me the Oracle
sign-in link and code, and create a private session.

Format 2: Client ID and Refresh Token

EPM Environment URL: <exact HTTPS URL of your Cloud EPM environment>
EPM Environment Name: <symbolic short name to refer to this environment, such as EPM Test>
Client ID: <OAuth2 client ID>
Refresh Token File: <absolute path to the private refresh-token file>

The referenced file must contain only the client ID and refresh token. Do not include a Bearer prefix, JSON wrapper, label, or embedded whitespace. The Client ID and refresh token must correspond to the configured client and selected environment. This method does not require an EPM username or password.

The Auth skill discovers the validated token service, obtains an access token when needed, and securely saves each replacement refresh token before using it. Keep the current token file and its private, writable directory available for renewal.

Use independent refresh-token sequences for separate integrations. Do not share one rotating token sequence between EPM Automate, a REST client, and an agent session.

Note:

The OAuth2 Setup skill generates a JSON credential file containing client_id and refresh_token. This differs from the raw token file required by the Refresh Token File entry. Do not reference the JSON file as a raw token file.

Example prompt:

Use refresh-token OAuth2 for EPM Test with the Client ID and private
refresh-token file referenced in my selected configuration. Then list
the available snapshots.

Format 3: Access Token

EPM Environment URL: <exact HTTPS URL of your Cloud EPM environment>
EPM Environment Name: <symbolic short name to refer to this environment, such as EPM Test>
Access Token File: <absolute path to the private access-token file>

The referenced file must contain only the access token, without a Bearer prefix or JSON wrapper. This method requires no additional Client ID, Service Instance ID, EPM username, or password. The token must already be valid for the selected environment and user context.

This method does not renew access automatically because it does not supply a refresh token. If the token expires or the service rejects it, provide a new private token file and request recovery through the Auth skill.

Example prompt:

Use the access-token file referenced in my selected private configuration
for EPM Test. Then get the daily maintenance start time and time zone.

Selecting Environments and Reusing Sessions

Keep a separate configurations and private credential sources for each environment, or clearly identify each environment’s entries in a shared configuration file. Specify the intended environment in your prompt.

Each environment requires its own bound session and token sequence, even when environments share an Identity Domain or Client ID.

For application registration, the Core OAuth2 Setup skill accepts a separate JSON setup template or a properties file with key:value or key=value entries. Each environment record identifies one environment. This setup file describes services and proposed application changes; do not include passwords or token values.

After successful Oracle sign-in, the setup workflow can provide private credential files for each environment. See OAuth2 Setup Skill in Featues with AI .

Token Lifetime and Connection Validation

A saved configuration, successful local bootstrap, or successful token issuance does not prove access to a requested EPM operation. Before a live business operation, shared Auth skill obtains and saves information identifying the services available for the selected session when needed; the domain then checks whether the requested operation is supported and permitted by the user’s roles.

Service information is reused for the environment and identity associated with that session. Direct access tokens expire; device-sign-in and refresh-token sessions renew on demand using their authoritative private session state. Do not bootstrap from a stale exported token snapshot after refresh-token rotation.

After an authentication failure or an uncertain token exchange, stop and use Auth recovery. Do not resend a possibly consumed refresh token or automatically repeat a failed business request.

Additional Example Prompts

  • Use my existing OAuth2 session for EPM Production to get the latest Activity Report.
  • Prepare separate device-code OAuth2 sessions for the test and production environments in my selected configuration.
  • I replaced the expired access token in my private source file. Prepare a new access-token session for EPM Test and retry the requested read once.
  • Use the current authoritative refresh-token session for EPM Test. Do not create a new session from my older exported credential file.
  • Explain which OAuth2 setup prerequisites are missing for my selected environment without displaying credentials.

Note:

A configuration file can include multiple environments that use different authentication methods. For example, one environment can use a username and password, another can use a Client ID and Service Instance ID, and a third can use a Client ID and Refresh Token File.