> For the complete documentation index, see [llms.txt](https://blog.rhinoautomator.com/brians-integration-and-automation-notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://blog.rhinoautomator.com/brians-integration-and-automation-notes/automations/teams-notifications-azure-bot/the-basics-getting-started/getting-the-ids-from-teams.md).

# Getting the IDs from Teams

{% hint style="danger" %}
I've migrated the entire blog over to my new website. Please go to [https://rhinoautomator.com](https://rhinoautomator.com/) for more as this will be deleted at some point.
{% endhint %}

### IDs Needed

When you work with proactive notifications, you need three IDs to be able to send a notification to Teams

* [ ] Tenant ID
* [ ] Team ID
* [ ] Channel ID

### From the Bot Response Webhook Handler

There are several ways to go about getting these IDs but one helpful way is that every time your bot is added to a new Team, those IDs get sent to the Rewst webhook. New channels that also get added to a team after the bot is installed are also sent. You can build a sub-workflow that handles how to document those IDs based on the response you get in the JSON payload.

### Using Graph API

A second way to get these IDs is to use the Graph API:

{% embed url="<https://learn.microsoft.com/en-us/graph/api/teams-list?view=graph-rest-1.0&tabs=http>" %}
Graph API Call to List Teams to Obtain IDs
{% endembed %}

{% embed url="<https://learn.microsoft.com/en-us/graph/api/channel-list?view=graph-rest-1.0&tabs=http>" %}
Graph API Call to List Channels of Teams to Obtain Channel IDs
{% endembed %}

With those two calls you can discover the IDs for the team and channel. Using this way, you shouldn't need to dig for tenant IDs since to make the calls you would have to have had those in your system already.
