Skip to content

teams-notifier/bf-directline-endpoint

Repository files navigation

bf-directline-endpoint

Teams Notifier's bot framework directline component.

Authentication is either relying on MICROSOFT_APP_PASSWORD or MICROSOFT_APP_CERTIFICATE AND MICROSOFT_APP_PRIVATEKEY.

Environment variables or .env:

  • PORT: Port to listen to (default: 3978)

  • MICROSOFT_APP_ID: App registration application id

  • MICROSOFT_APP_PASSWORD: Application password

  • MICROSOFT_APP_CERTIFICATE: Base64 representation of the PEM certificate

  • MICROSOFT_APP_PRIVATEKEY: Base64 representation of PEM privatekey

  • MICROSOFT_APP_TENANT_ID: Tenant ID

  • DATABASE_URL: Database DSN in the form: postgresql://{USER}:{PASSWORD}@{HOST}/{DATABASE}

Bot registration on Microsoft Teams / Entra

Register a bot will bring you to 4 different MS portals, to register a bot, follow those steps:

In the Bot config itself:

In the Entra App registration:

  • Expend Manage and choose Certificates & secrets

  • Choose either:

    • to generate a client secret (24 months max validity using the UI, longer using powershell)
    • generate and upload a certificate
  • Go to https://dev.teams.microsoft.com/apps

    • Give it a name

In the newly created app:

  • Basic information

    • fill the required fields
    • in Application (client) ID, set the bot ID from the first step
  • Branding: setup the Color icon, the Outline icon and the Accent color (for the provided icons, I suggest #5c61ce as accent color)

  • App features: select Bot, then

    • choose the bot you created in the previous steps
    • select all the scopes (Personal, Team, Group Chat)
    • you can add a bot command
      • command: help
      • description: Show help
      • scope: Personal
    • Save

Once everything is ready, head up to Publish > Publish to org and click Publish your app, if submission fails, double check all mandatory fields are filled in Configure > Basic information

Now it has been published, it can take a bit for the app to show up on Teams Admin center.

  • Go to https://admin.teams.microsoft.com/
  • Teams apps > Manage apps
  • Search in the list for your app name (let's say Notifier), it should be in Blocked status
  • Click it and at the top click Publish

NOTE: You'll need to revalidate every time you publish an update of the app (icon, description, commands etc...)

About

Teams Notifier's botframework directline component. Used to receive botframework notification and provide Teams user interactions

Resources

License

Stars

Watchers

Forks

Packages