Showing posts with label PowerAutomate. Show all posts
Showing posts with label PowerAutomate. Show all posts

Sunday 23 August 2020

Power Automate: Sending Emails without User Context

This article helps us to understand the way to send emails without the user context. This could be applicable for applications, where consumers/users are non-licensed.  

This could be achieved with the help of few set of actions on Power Automate flow. Here Microsoft graph end points are used to send emails on power automate, based on application permissions. The app permission needs to be enabled on Azure AD app. 

Let us only look at the power automate configuration, instead of end-end business scenario. The following snapshot shows the actions. 

Power Automate Flow : To send emails without user context

Sunday 28 June 2020

Model Driven PowerApp: 360 Degree View Dashboard to Monitor Data from External Systems (Azure AD and Azure Cosmos DB)

Problem: The business dealership information is being captured on multiple external systems. There is a need for business to capture 360° data view dashboard to keep track of information of dealers, sales data, and many other dealership information at one place. And this dashboard is for business users on the organization for monitoring.

Let us take an example of dealership architecture, where dealer identities/domain information are stored on external Azure AD, and basic details of dealership is stored on Azure Cosmos database.

Note: The dealership use case is an example for us to explore the possibilities. Similarly, this can be replaced with any other data model.

Design & Solution Considerations


The following elements/components are considered for building this solution.
  • Azure Cosmos Database, which holds dealership’s basic information 
  • Azure Active Directory, which holds the domain/identity information of dealership users [This is external/separate domain, holding only dealership users] 
  • Power Automate, to integrate and push the data to CRM system. 
  • Microsoft Common Data Service, which acts as intermediate storage and containing subsets of information from two other systems. [Azure Cosmos DB and Azure AD] 
  • Power Apps – model driven app, which has necessary dashboard for business users. 

The following shows high level design of 360 degree architecture, integrating data from multiple systems.
High level design for Dashboard providing 360 degree of dealership data
High level design for Dashboard providing 360 degree of dealership data

The following illustrates the design.
  • The necessary data model or entities are created on Microsoft CDS to capture the data from multiple system. For now in this usecase, let us focus on one entity, I.e., dealers.  
  • The flow configured on Power Automate runs as a scheduled job, to synchronize the data into CDS. Pulls minimal information from Azure AD and Azure Cosmos database, and synchronize the data subset into Microsoft CDS.  
  • Power Apps, which has views, forms and dashboards pulls and shows the information from entities, which is configured in the underlying CDS. 

Now let us get deeper into the solution, to see how these are configured.

Wednesday 13 May 2020

Provision Private Channels on Microsoft Teams with Tabs

Let us understand how to auto-provision a private channel on Microsoft Teams, along with necessary tabs added on the private channel in an automated way.

Article: Private channel provisioning along with necessary tabs could automated with the help of Power Automate flow and Microsoft Graph API. Microsoft Graph API provides us the beta/major version of the graph endpoints to achieve the provisioning solution. Power Automate flow is configured with necessary HTTP requests for provisioning and automate the process.

The solution requires two major steps.
  • Creating Private Channel
  • Adding Tabs


Create Private Channel on Microsoft Teams 


At the time of writing this article, private channel creation endpoint is not available with major version (v1.0). Major version of graph endpoint, provides option to create a channel, but not private channels.
POST https://graph.microsoft.com/v1.0/teams/{id}/channels
Content-type: application/json
{ "displayName": "Architecture Discussion", "description": "This channel is where we debate all future architecture plans" } 

The beta version of graph endpoint, provides option to create a private channel. The endpoint requires a payload to define the nature of channel and to add members with their roles. The following snapshot from Power Automate shows the way to create a private channel, with a member and their role.
Create a private channel
Create a private channel

Sunday 2 February 2020

Setting up Microsoft Teams Shifts Schedule Reminders

This article will help us to setup reminders for Shifts on Microsoft Teams using Power Automate. This will help to understand how shift reminders are triggered to shift owners a day before the shift schedules, as gentle reminders.

Before getting into implementation, we will see short introduction of Shifts app. Recently Microsoft has retired the Staffhub service, and Shift app is available as replacement and is available as an app on Microsoft Teams.


Microsoft Team's Shifts App


Shifts App, as quoted on Microsoft documentations: The Shifts app in Microsoft Teams keeps Firstline Workers connected and in sync. It's built mobile first for fast and effective time management and communication for teams.

Shifts app lets users on Microsoft Teams to create necessary shift schedules, and assign/share the schedules with teams. Once the schedule is created and shared on Teams, users will be able to view the schedules on their Teams login.
  • Currently, notifications are not working as expected. In my case, after sharing the schedule with a team, the notifications were not triggered to teams users. 
  • The shift schedule is not currently synced up with calendars. 
Hope the above drawbacks would be addressed in the near future by Microsoft product team.

This article helps us to understand a reminder notification requirement, which I came across recently. Let us look at how to trigger reminder notifications to respective schedule owners a day before the shift schedule.

Create a necessary shift schedules and share it with teams on Microsoft Teams interface.
Microsoft Team Shifts App - Sample Shift Schedule
Microsoft Team Shifts App - Sample Shift Schedule

Friday 6 December 2019

Identifying Microsoft Teams and the Classic SharePoint Team Site associations with Office 365 Groups: View on PowerApps

Let us see how to create a simple dashboard to identify if Office 365 group has been associated with Microsoft Teams and SharePoint modern team sites.

Office 365 Groups are created with various aspects. Microsoft Teams and Modern SharePoint team sites are created with/from Office 365 groups. Office 365 group is an object on Azure active directory, which will basically a collection of users.

PLEASE NOTE: Every Team created on Microsoft Teams, should have Team Site created and associated. This article only demonstrates the group and teams association, or group and sites association. The site which is not created manually/separately using group is not considered as association here, in this requirement/scenario.

To get the simple view for business users, Power Apps could be leveraged with custom connectors. There are other ways to achieve the same functionality like staging data on SharePoint with power automate and then representing the information on client apps, but I use the simple and straight forward to achieve the requirement.


Microsoft Graph API - Identify group associations


Office 365 groups data is exposed via Microsoft Graph APIs. The key parameters to be leveraged in the Graph API for this use case will be,
  • Group display Name 
  • ResourceProvisioningOptions - if MS team is created for the group, this property will have a value “Team” 
  • CreationOptions – If modern team site has been created with the group, this property will have a value “SPSiteLanguage:1033” 

The following snapshot shows the graph API response showing if the group has Microsoft Teams and SharePoint modern team site associations.
MS Graph API - representing the associations
MS Graph API - representing the associations