Expand Calendar Control in Cloud Flow using Custom API

Problem Statement:

To utilize the Expand Calendar feature in Cloud Flow, it’s necessary to invoke the Dynamics API. However, this entails exposing the Client ID and Secret, which raises security concerns. To avoid this, a more secure alternative is to use a Custom API.

Solution:

Scenario:

In this scenario, I am trying to retrieve Total working hours between specific time using Custom API.

Custom API:

  • Create Custom API in make.powerapps.com -> solutions
  • Fill necessary details and Plugin Step which is shown in Custom API code section.

Custom API Parameters:

  • Create Custom API Request Parameters. This Parameters will be used to provide data to Custom API.
  • Example of Request Parameter.
  • Create Custom API Response Parameters. This Parameters will be used to take response from Custom API.
  • Example of Response Parameter. This will pass Total Hours in Calendar.

Custom API Code:

  • Create Plugin class for Custom API
  • Get Input Parameters
  • Logic to retrieve total working hours between specific time using Custom API.
  • Set Output Parameter

Register Custom API in Plugin Registration Tool:

  1. In Plugin registration tool, App plugin assembly:
  • Register New Step

Use Custom API in Cloud Flow:

  • Add Unbound Action in Cloud Flow
  • Set Action Name, Input Parameters
  • Use Output of Custom API.

Note: We can also use Custom Action, but Custom API is recommended approach.

Conclusion:

Thus, Using Custom API we can execute Expand Calendar Control function without Client Id and Secret.

One thought on “Expand Calendar Control in Cloud Flow using Custom API

Add yours

Leave a Reply

Up ↑

Discover more from Customizers

Subscribe now to keep reading and get access to the full archive.

Continue reading