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
Copy file name to clipboardExpand all lines: src/content/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels.mdx
+222Lines changed: 222 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -461,6 +461,228 @@ The best practice is to use the `channelSchema` endpoint to see which fields mus
461
461
```
462
462
</Collapser>
463
463
464
+
<Collapser
465
+
className="freq-link"
466
+
id="microsoft-teams"
467
+
title="Microsoft Teams"
468
+
>
469
+
<Callouttitle="Note">
470
+
The Microsoft Teams integration is now available in both US and EU regions.
471
+
</Callout>
472
+
473
+
### Prerequisites
474
+
475
+
Before configuring New Relic to send notifications to Microsoft Teams, you must:
476
+
477
+
* Have an existing Microsoft Teams channel where you want to receive notifications.
478
+
* Create a [Microsoft Teams destination](/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-destinations/#microsoft-teams) in New Relic and obtain the `destinationId`.
479
+
480
+
### Step 1: Fetch available Team IDs
481
+
482
+
<Calloutvariant="tip">
483
+
If you already know your Team ID and Channel ID, you can skip Steps 1 and 2 and go directly to [Step 3](#step-3-configure-the-new-relic-notification-channel) to configure the notification channel.
484
+
</Callout>
485
+
486
+
This query discovers which Microsoft Teams are accessible through your destination. You provide the `destinationId` and specify that you want Team IDs (via `key: "teamId"`), and the API returns a list of available teams with their names and IDs:
487
+
488
+
```graphql
489
+
{
490
+
actor {
491
+
account(id: YOUR_ACCOUNT_ID) {
492
+
aiNotifications {
493
+
suggestions(
494
+
destinationId: YOUR_DESTINATION_ID,
495
+
key: "teamId",
496
+
channelType: MICROSOFT_TEAMS,
497
+
constraints: []
498
+
) {
499
+
entities {
500
+
displayValue
501
+
value
502
+
}
503
+
errors {
504
+
description
505
+
details
506
+
type
507
+
}
508
+
}
509
+
}
510
+
}
511
+
}
512
+
}
513
+
```
514
+
515
+
The response will contain a list of teams with their display names and unique Team IDs:
516
+
517
+
```json
518
+
{
519
+
"data": {
520
+
"actor": {
521
+
"account": {
522
+
"aiNotifications": {
523
+
"suggestions": {
524
+
"entities": [
525
+
{
526
+
"displayValue": "Engineering Team",
527
+
"value": "389e7f6c-xxxx-47f0-aa77-xxxxxxxxxxxx"
528
+
},
529
+
{
530
+
"displayValue": "DevOps Team",
531
+
"value": "834dc358-xxxx-4445-9938-xxxxxxxxxxxx"
532
+
}
533
+
],
534
+
"errors": []
535
+
}
536
+
}
537
+
}
538
+
}
539
+
}
540
+
}
541
+
```
542
+
543
+
<Calloutvariant="tip">
544
+
If you don't see the team you're looking for in the results, you can use the `filter` parameter to search for it by name:
545
+
546
+
```graphql
547
+
{
548
+
actor {
549
+
account(id: YOUR_ACCOUNT_ID) {
550
+
aiNotifications {
551
+
suggestions(
552
+
destinationId: YOUR_DESTINATION_ID,
553
+
key: "teamId",
554
+
channelType: MICROSOFT_TEAMS,
555
+
constraints: [],
556
+
filter: {
557
+
type: CONTAINS,
558
+
value: "Engineering"
559
+
}
560
+
) {
561
+
entities {
562
+
displayValue
563
+
value
564
+
}
565
+
}
566
+
}
567
+
}
568
+
}
569
+
}
570
+
```
571
+
</Callout>
572
+
573
+
### Step 2: Fetch available Channel IDs for a Team
574
+
575
+
Once you have a Team ID from Step 1, this query discovers which channels exist within that specific team. You provide the `destinationId` and the `teamId` (as a constraint), and the API returns a list of available channels with their names and IDs:
576
+
577
+
```graphql
578
+
{
579
+
actor {
580
+
account(id: YOUR_ACCOUNT_ID) {
581
+
aiNotifications {
582
+
suggestions(
583
+
destinationId: YOUR_DESTINATION_ID,
584
+
key: "channelId",
585
+
channelType: MICROSOFT_TEAMS,
586
+
constraints: [
587
+
{
588
+
key: "teamId",
589
+
value: "YOUR_TEAM_ID"
590
+
}
591
+
]
592
+
) {
593
+
entities {
594
+
displayValue
595
+
value
596
+
}
597
+
errors {
598
+
description
599
+
details
600
+
type
601
+
}
602
+
}
603
+
}
604
+
}
605
+
}
606
+
}
607
+
```
608
+
609
+
The response will contain a list of channels within the specified team:
Similar to Team IDs, you can filter channels by name using the `filter` parameter to search within the specified team.
639
+
</Callout>
640
+
641
+
### Step 3: Configure the New Relic notification channel
642
+
643
+
After obtaining both the Team ID and Channel ID, configure the New Relic notification channel to send alerts to your Microsoft Teams channel.
644
+
645
+
<Calloutvariant="important">
646
+
This mutation creates a New Relic notification channel object that connects to an **existing** Microsoft Teams channel. The Teams channel must already exist in your Microsoft Teams workspace. This API does not create new teams or channels within Microsoft Teams itself - it only configures New Relic to send notifications to your existing Teams channels.
Copy file name to clipboardExpand all lines: src/content/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-destinations.mdx
+36Lines changed: 36 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -293,6 +293,42 @@ In order to create a destination, different inputs must be supplied for each des
293
293
Because our integration with slack is only available with OAuth2 authentication, the destination cannot be created with a mutation.
294
294
</Collapser>
295
295
296
+
<Collapser
297
+
className="freq-link"
298
+
id="microsoft-teams"
299
+
title="Microsoft Teams"
300
+
>
301
+
<Callouttitle="Note">
302
+
The Microsoft Teams integration is now available in both US and EU regions.
303
+
</Callout>
304
+
305
+
Before creating a New Relic destination that connects to Microsoft Teams, you must [install the New Relic for Microsoft Teams app](/docs/alerts/get-notified/microsoft-teams-integrations/#add-new-relic-for-microsoft-team) in your Microsoft Teams workspace. After installation, you'll receive a security code that is required for this mutation.
After creating the New Relic destination, obtain the `destinationId` from the response. This ID is required to configure notification channels. See the [Microsoft Teams channel configuration section](/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#microsoft-teams) for the complete workflow.
0 commit comments