Microsoft Dynamics CRM is an excellent resource for establishing and managing business relationships with the customers to whom your products or services are directed. However, it is intended as a management tool that requires users to be licensed, being out of the reach (and interest) of our clients.
Alternatively, we have Power Apps Portals, which have been very useful for allowing users outside their organizations to sign in with a wide variety of identities, create and view data in CDS (which now has been renamed as Microsoft Dataverse), or even browse content anonymously. Among all the available portals, today we are going to focus on one whose approach is radically different from the others: The Events Management Portal.
Unlike the rest of Power Apps Portals, this one has a downloadable front-end Angular application, which allows you to choose whether you want to host it in Dynamics 365 Portals or in your favorite Content Management Software. This peculiarity means that we do not have at our disposal here the possibility of defining the portal from the CRM, nor that we can access the CDS from the pages through the liquid. Not at least without modifying the behavior of the portal through the Angular application, which will result in that when we want to migrate the portal, we have to do it “for two places”, one the Angular application, and the other, the CRM configurations.
Event API is everything we can access from the events portal. A kind of WebAPI restricted to the entities most closely related to event registration (leaving out the Contact table). These entities are the ones seen in this image:
We can extend this API through the custom fields for the mentioned entities, but we cannot extend it by inserting new entities.
So, if we want to access the CRM data outside that Event API too, for example, show certain screens or not depending on the role that the logged-in contact has, we need to do a lot of juggling to use the WebAPI, or set up an external API that authenticates directly with the CRM, with the cost and time that this implies.
Here I am proposing an easy, quick, and inexpensive alternative that I used: HTTPS requests to Power Automate flows, which authenticates with the CDS through an application user registered in the environment, through a connector. Through these flows, we can perform CRUD operations on the CDS, whether they are entities included in the Event API or not.
This is an example of that kind of flow:
This flow exposes a URL and defines a JSON schema to be posted to it. Then, from the Angular application, we just need to worry about how to make this HTTP call.
I hope you find this article helpful.