mspnp / AzureNamingTool

The Azure Naming Tool is a .NET 8 Blazor application, with a RESTful API. The UI consists of several pages to allow the configuration and generation of Azure Resource names. The API provides a programmatic interface for the functionality.
https://aka.ms/azurenamingtool
MIT License
308 stars 604 forks source link

Webhook doesn't seem to support pushing to MS Teams channel #50

Closed knuterik-ballestad closed 7 months ago

knuterik-ballestad commented 7 months ago

Tool version 3.2.0

Describe the bug MS Teams webhook URL pasted into web UI in azurenamingtool. No entries are created in teams channel.

To Reproduce Steps to reproduce the behavior (translated choices from Norwegian Teams UI - text may or may not correlate to english Teams UI):

  1. Go to 'Teams'
  2. Click on 'Channel settings'
  3. Click on 'Connections'
  4. Click on 'Edit'
  5. Click on 'Configure incoming webhook'
  6. Type in a name
  7. Click on 'Create'
  8. Copy URL
  9. In Azurenamingtool, Click "Admin" --> "Generation webhook"
  10. Paste in URL and click "Save"

Expected behavior Generated names should appear in Teams channel

Screenshots Nothing appears in Teams

Installation Method Click-ops, installed as Container App, Auth added

BryanSoltis commented 7 months ago

Hello @knuterik-ballestad,

Thank you for your feedback. The Azure Naming Tool webhook post is a simple JSON payload of the generated name and selected components. Microsoft Teams requires a very specific payload with several components (summary, text, etc.). In addition, the type of message posted to Teams would require different payload components (for a message, poll, card, etc.). You would need to post the Naming Tool webhook payload to another service and construct all the required components for Microsoft Teams. (Azure Function, Logic App, etc.)

You can find more about posting messages to Teams here:

https://learn.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/connectors-using?tabs=cURL