You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The PagerDuty auth provider enables tools and agents to call [PagerDuty APIs](https://developer.pagerduty.com/api-reference/) on behalf of a user using OAuth 2.0 authentication.
6
6
7
+
<Callouttype="warning">
8
+
Arcade currently supports **Classic** PagerDuty OAuth apps only. Choose Classic and select either **read-only** or **read/write** access. Newer Web App or other models are not supported. See [PagerDuty OAuth functionality](https://developer.pagerduty.com/docs/oauth-functionality).
9
+
</Callout>
10
+
7
11
<Callout>
8
12
Want to quickly get started with PagerDuty in your agent or AI app? The
9
13
pre-built [Arcade PagerDuty MCP
@@ -56,10 +60,10 @@ To integrate with PagerDuty's API using OAuth 2.0, you'll need to register an ap
56
60
57
61
#### Configure OAuth settings
58
62
59
-
1. Choose **Scoped OAuth**as the authorization method
60
-
2. Select the required**permission scopes**based on your application's needs:
61
-
-Common scopes include: `read`, `write`, `analytics.read`, `users.read`, `teams.read`, etc.
62
-
3. Add the **Redirect URL** generated by Arcade (see configuration section below) to your app's redirect URLs
63
+
1. Choose **Classic**OAuth and select the permission level:
64
+
-**Read-only**(recommended; all current MCP tools only read data)
65
+
-Or **Read/Write** if you plan custom tools that modify data
66
+
2. Add the **Redirect URL** generated by Arcade (see configuration section below) to your app's redirect URLs
63
67
64
68
#### Save your credentials
65
69
@@ -68,7 +72,7 @@ To integrate with PagerDuty's API using OAuth 2.0, you'll need to register an ap
68
72
69
73
</Steps>
70
74
71
-
For detailed instructions, refer to PagerDuty's [OAuth 2.0 guide](https://www.pagerduty.com/blog/insights/build-sophisticated-apps-for-your-pagerduty-environment-using-oauth-2-0-and-api-scopes/) and [OAuth documentation](https://developer.pagerduty.com/docs/ZG9jOjExMDI5NTgx-o-auth-2-functionality).
75
+
For detailed instructions, refer to PagerDuty's [OAuth 2.0 guide](https://www.pagerduty.com/blog/insights/build-sophisticated-apps-for-your-pagerduty-environment-using-oauth-2-0-and-api-scopes/) and [OAuth documentation](https://developer.pagerduty.com/docs/oauth-functionality).
72
76
73
77
Next, add the PagerDuty app to Arcade.
74
78
@@ -143,7 +147,7 @@ Edit the `engine.yaml` file and add a new item to the `auth.providers` section:
console.log("Please complete the authorization challenge in your browser:");
@@ -249,21 +250,18 @@ You can use the pre-built [Arcade PagerDuty MCP Server](/mcp-servers/development
249
250
250
251
If the pre-built tools in the PagerDuty MCP Server don't meet your needs, you can author your own [custom tools](/home/build-tools/create-a-mcp-server) that interact with the PagerDuty API.
251
252
252
-
Use the `OAuth2()` auth class to specify that a tool requires authorization with PagerDuty. The `context.authorization.token` field will be automatically populated with the user's PagerDuty token:
253
+
Use the `PagerDuty()` auth class to specify that a tool requires authorization with PagerDuty. The `context.authorization.token` field will be automatically populated with the user's PagerDuty token:
253
254
254
255
```python {8-12,22}
255
256
from typing import Annotated
256
257
257
258
import httpx
258
259
from arcade_tdk import ToolContext, tool
259
-
from arcade_tdk.auth importOAuth2
260
+
from arcade_tdk.auth importPagerDuty
260
261
261
262
262
263
@tool(
263
-
requires_auth=OAuth2(
264
-
provider_id="arcade-pagerduty",
265
-
scopes=["read"]
266
-
)
264
+
requires_auth=PagerDuty()
267
265
)
268
266
asyncdefget_current_user(
269
267
context: ToolContext,
@@ -283,11 +281,11 @@ async def get_current_user(
283
281
returndict(response.json())
284
282
```
285
283
286
-
## Available Scopes
284
+
## Permissions
287
285
288
-
PagerDuty uses a simplified scope system with the following scopes:
286
+
PagerDuty Classic apps use two permission levels:
289
287
290
-
-`read` - Read-only access to PagerDuty resources
291
-
-`write` - Full read and write access to PagerDuty resources
288
+
-**read** — Read-only access to PagerDuty resources (recommended; all current MCP tools are read-only)
289
+
-**write** — Full read/write access (only needed if you add custom write tools)
292
290
293
-
For more details about PagerDuty's OAuth scopes and permissions, refer to the [PagerDuty OAuth Scopes documentation](https://developer.pagerduty.com/docs/ZG9jOjExMDI5NTgx-o-auth-2-functionality#scopes).
291
+
For more details about PagerDuty’s OAuth permissions, refer to the [PagerDuty OAuth functionality docs](https://developer.pagerduty.com/docs/oauth-functionality#scopes).
0 commit comments