Skip to content

ericsche/MCinTeams

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Message Center in Teams

Description

Message Center in Teams is a simple PowerAutomate Solution to gather Message Center Announcement and post them in a Teams Channel. Its goal is to leverage Teams and SharePoint list to ease the access and simplify sharing of message center announcement.

Message Center Post in Teams

Deployment steps

PreReqs

  • This solution require at least 1 PowerAutomate user license for the person that will import the flows, they use Premium Connector to query the management API.

  • You will need Azure AD administrator priviledge to register your app and consent permission for your app.

Create the Azure AD App Id

Create an Azure AD app to Query the Message Center API.

  • Go in App Registrations view in Azure AD admin portal

    New App Registration

    Click register a New apps in your tenant.

  • Name it accordingly and keep the default configuration

    Naming the App

  • Please keep the application ID and Tenant ID that will be needed for later use

    Save AppID and Tenant ID

  • Open the API Permissions view and Click “+ Add a permission”

    Add a Permission

  • Choose Microsoft Graph

    Microsoft Graph API

  • Choose Application permissions for later use in the Power Automate

    App Permission

  • Select ServiceMessage.Read.All. You can use the search function to navigate the list.

    ServiceHealth.Read Permission

  • Remove the Default Microsoft Graph Permission (User.Read) Remove Default Permission

  • Grant Admin Consent for your tenant (Extra permission Required see PreReqs)

    Granted Admin Consent

  • Go in Certificates & Secrets section to generate a new Client secrets

    Cert & Secrets Section

  • Name it and choose an expiry date according to your security practice

    Secret creation

  • Save the Generated Secret for later use, it cannot be displayed again

    Secret generated

Import the MC in Teams Solution in Power Automate

Message Center in teams v2 now leverage a Power Automate unmanaged solution to improve the installation flow. For more details on Power Automate solutions click here.

  • Download the Power Automate Solution that is available here

  • Connect to PowerAutomate with a user that has a PowerAutomate user plan license

  • Navigate to the Solutions page and click the Import solution button

    Import Solution

  • Select the MCinTeams_1_0_0_6.zip and click Next.

    Select Solution

  • Review the details and click Next to finish the import.

    Review Solution

  • Last Step is to update the Connections reference with your account.

    Review Solution

  • You should see an import success message.

    Import Success

Configure the Solution

  • Open the Solution by clicking on it.

  • Navigate to the Environment variable Section.

    Environement Variables

  • Open each Variable and update its Default Value with the one from your tenant.

    Edit Environement Variables

Note: If you were unable to create your AppClientID and AppSecret you can keep the default ones. They'll work but note that they are linked to my tenant hosted in Europe. Some Message Center posts are tenant specific so you might miss some if you don't use your own credentials.

Initialize the Solution

  • Navigate to the Cloud flows section. Cloud Flows

  • Run the Message Center - Create List flow once. It will create the SharePoint List in the Teams you specified with the Environment Variables. Run Create List Flow Success

  • Once finished please Turn off the flow. It will prevent re-creating a list that could cause troubles. Turn off flow

  • If you wish to hydrate the database to avoid starting from 0. You can run once MessageCenter - Initiate MC. It will connect to the message center API and download all messages that are online today. Run initiate MC Check MC list You can check the SharePoint list to confirm the flow is working.

  • Once finished please Turn off the flow. If run twice it will create duplicate items in the list. It that happens just remove all the items of the list and re-run MessageCenter - Initiate MC

  • Turn on the MessageCenter - Get New MC flow. This will enable the solution to poll new message center every 2 hours. Turn on flow

  • Turn on the MessageCenter - Post in Teams - Teams MC flow. This flow will post new Teams messages in the provided channel automatically.

Congrats the Message Center in Teams Solutions is now fully functional!

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

About

Message Center in Teams is a simple PowerAutomate Solution to gather Message Center Announcement and post them in a Teams Channel

Topics

Resources

License

Stars

Watchers

Forks