Risk Automations: Set Up Microsoft Teams Credentials for User Risk Templates
- Overview
- Step 1: Copy the OAuth redirect URL
- Step 2: Create an Entra app registration
- Step 3: Assign permissions
- Step 4: Add the redirect URI
- Step 5: Generate a client secret
- Step 6: Add the credential to Risk Automations
- Replace the client secret before it expires
Overview
🎵 New to Risk Automations templates? Start with Use Risk Automation Templates.
There are User Risk templates that message your users in Microsoft Teams (e.g. Notify users about a breach). In order to do this, Risk Automations first needs a Microsoft Teams Account credential that connects to its own Entra app registration.
Setup workflow:
- Copy the OAuth redirect URL from Risk Automations.
- Create an Entra app registration with permissions to message users, add the redirect URI, and generate a client secret.
- Enter the app registration’s values into the Microsoft Teams Account credential.
You’ll gather three values from Entra:
- Application (client) ID
- Directory (tenant) ID
- Client secret value
🎵 Setting up Reset exposed credentials? It uses a different app registration — see Risk Automations: Configure the ‘Reset Exposed Credentials’ Template.
Step 1: Copy the OAuth redirect URL
- Click the Risk Automations icon in UpGuard’s left-hand navigation panel.
- Click Credentials.
- Select Microsoft Teams Account.
- Copy the OAuth Redirect URL.
Keep the URL handy, because you’ll add it to your Entra app registration in Step 4.
Step 2: Create an Entra app registration
❗Don’t reuse the registration you created for your User Risk directory integration. We recommend separate registrations for different purposes.
- Open the Microsoft Entra admin center.
- Go to Identity > Applications > App registrations.
- Click New registration.
- Enter a name (for example, UpGuard-Communicate-With-Users).
- For Supported account types, select Single tenant.
- Click Register.
Your app registration is now created.
To learn more, see Microsoft’s guide: Register an application in Microsoft Entra ID.
Step 3: Assign permissions
- In your app registration, click API permissions.
- Click Add a permission, then select Microsoft Graph.
- Select Application permissions.
- Select each permission in the table below.
- Click Add permissions.
- Click Grant admin consent for [your tenant name].
- Check the Status column and confirm each permission shows Granted.
|
Permission |
What the template uses it for |
|
ChannelMessage.Read.All |
Read channels and messages in Microsoft Teams |
|
Chat.Read.All |
Read 1:1 and group chats in Microsoft Teams |
|
Team.ReadBasic.All |
List all teams in Microsoft Teams |
To learn more, see Microsoft’s guide: Configure app permissions for a web API.
Step 4: Add the redirect URI
- In your app registration, click Authentication (Preview).
- Click Add Redirect URI.
- Select Web.
- Paste the OAuth redirect URL you copied in Step 1.
Step 5: Generate a client secret
❗ When the secret expires, the credential can no longer authenticate to Entra and the workflow fails.
- In your app registration, click Certificates & secrets, then Client secrets.
- Click New client secret.
- Enter a description that includes the expiry date (for example, UpGuard Risk Automations communicate with users, expires [month year]).
- Select an expiry date.
- We recommend 12 months, but you can choose a shorter period if your security policy requires it. Entra caps a secret’s lifetime at 24 months.
- You can’t extend a secret. When it expires, you create a new one.
- Add the expiry date to your team’s calendar or ticketing system so you can replace the secret before it expires.
- Click Add.
- Copy the secret Value.
- Entra shows the secret value only once — if you miss it, create a new secret.
To learn more, see Microsoft’s guide: Add and manage application credentials in Microsoft Entra ID.
Step 6: Add the credential to Risk Automations
- In the Entra admin center, go to your app registration’s Overview page.
- Copy the Application (client) ID and the Directory (tenant) ID.
- In UpGuard, navigate to Risk Automations > Credentials.
- Select Microsoft Teams Account.
- In Authorization URL, replace “common” with your Directory (tenant) ID.
- In Access Token URL, replace “common” with your Directory (tenant) ID.
- In Client ID, enter your Application (client) ID.
- In Client Secret, enter the client secret value you copied in Step 5.
- Scroll to the bottom of the modal and click Connect my account.
- Save the credential.
Your Microsoft Teams Account credential is now saved in Risk Automations. Next: configure, test, and activate your workflow.
Replace the client secret before it expires
Replace the secret before its expiry date so the workflow keeps running.
- In the Entra admin center, go to your app registration, then Certificates & secrets > Client secrets.
- Create a new secret and copy its Value.
- In UpGuard, navigate to Risk Automations > Credentials and open the Microsoft Teams Account credential.
- Replace the Client Secret with the new value and save.
- Run the workflow to confirm it still works.
- Return to Entra and delete the old secret.
🎵 An app registration can have more than one secret at a time. The old secret keeps working until you delete it.