Example configuration Microsoft Power Automate to automate routing based on Microsoft Entra ID Groups

This example shows you how you can use Microsoft Power Automate to automate your  routing.

Prerequisites

For this scenario we will be using:

  • Power Automate
  • SharePoint Online

Configuration

  1. Navigate to Microsoft Power Automate.

  2. Click "My Flows":

  3. Click "New" and "Scheduled- from Blank":

  4. Set schedule, for example every day:

  5. Add action "Get group members", from Microsoft .

    1. Fill in the Group ID.

      Note

      Group ID can be found on Microsoft Entra ID portal, https://entra.microsoft.com/#view/Microsoft_AAD_IAM/TenantOverview.ReactView

  6. Add action "Initialize variable".

    1. Name = UCC Routing ID

    2. Type = String

  7. Add action "Apply to each"

    1. Output = Group Members

  8. Add action "Get Items", from SharePoint

    1. Site Address = Your UCC's SharePoint Site

    2. List = Routing

    3. Filter Query:

      Expression
      wsp_ucc_routing_match_from eq '@{items('Apply_to_each')?['mail']}'

  9. Add action "Set Variable"

    1. Name = UCC Routing ID

    2. Value:

      Expression
      first(body('Get_items')?['value'])?['id']

  10. Add action "Condition"

    1. Value 1:

      Expression
      @variables('UCC Routing ID')
    2. Match = is equal to

    3. Value 2 =

  11. Add action "Create Item" of SharePoint, in if Yes.

    1. Site Address = Your UCC's SharePoint Site

    2. List = Routing

    3. Title:

      Expression
      AD Routing - @{items('Apply_to_each')?['userPrincipalName']}
    4. Match From: (can be any field in this example we use mail, to route on Microsoft Teams)

      Expression
      @{items('Apply_to_each')?['mail']}
    5. Action Value = Skill (can be replaced with any other action)

    6. Skill id = Name of the Skill you want to route to.

    7. Action Value = Skill (can be replaced with any other action)

    8. MatchEndpoint = All