Forum Discussion
CI CD Deployment issues with Teams Notifications
Hi sammydyson555 ,
This is a well‑known and very intentional security restriction in Azure DevOps / Power Platform connectors.
This is the Microsoft‑recommended replacement for CI/CD scenarios.
How it works:
Create an Incoming Webhook in the Teams channel and post messages using a simple HTTP POST
- No delegated user identity
- Fully CI/CD safe
Steps
- In Teams → Channel → Connectors
- Add Incoming Webhook
- Copy the webhook URL
- In Azure DevOps pipeline:
- Use HTTP task or PowerShell
- POST JSON payload
- Example (PowerShell):
Invoke-RestMethod -Uri $WEBHOOK_URL `
-Method Post `
-ContentType 'application/json' `
-Body '{
"text": "✅ Deployment completed successfully"
}'
Option 2: Power Automate Flow (Service‑Triggered)
If you want richer formatting or reuse logic:
- Create a Power Automate flow
- Trigger: When an HTTP request is received
- Action: Post message in Teams
- Call the Flow from CI/CD using HTTP
- Benefit:
- Teams auth stays inside Power Automate
- DevOps only calls an endpoint
It is CI/CD friendly and works with new Teams.
Option 3: Graph API + Application Permissions (Advanced)
Only if you control Entra ID and want full automation.
High‑level:
- Register an Entra ID App
- Grant Application permissions to Microsoft Graph:
- ChannelMessage.Send
- Use client credentials flow
- Call Graph API directly
Let me know if any solution from above works for you.
Thanks!