{"id":22695938,"url":"https://github.com/rajyraman/azd-logicapps-dataverse","last_synced_at":"2026-02-23T18:35:19.521Z","repository":{"id":175977877,"uuid":"654787536","full_name":"rajyraman/azd-logicapps-dataverse","owner":"rajyraman","description":"Sample repository that shows how to use azd with Logic Apps and Dataverse API","archived":false,"fork":false,"pushed_at":"2023-08-07T18:48:41.000Z","size":802,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-04T18:50:58.492Z","etag":null,"topics":["azd","dataverse","logic-apps","power-apps","powerapps"],"latest_commit_sha":null,"homepage":"","language":"Bicep","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rajyraman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-17T00:54:27.000Z","updated_at":"2024-04-04T19:48:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"5adaf7b4-9374-48f8-a70b-260371779203","html_url":"https://github.com/rajyraman/azd-logicapps-dataverse","commit_stats":null,"previous_names":["rajyraman/azd-logicapps-dataverse"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rajyraman%2Fazd-logicapps-dataverse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rajyraman%2Fazd-logicapps-dataverse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rajyraman%2Fazd-logicapps-dataverse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rajyraman%2Fazd-logicapps-dataverse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rajyraman","download_url":"https://codeload.github.com/rajyraman/azd-logicapps-dataverse/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246223319,"owners_count":20743165,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["azd","dataverse","logic-apps","power-apps","powerapps"],"created_at":"2024-12-10T04:12:22.380Z","updated_at":"2026-02-23T18:35:19.459Z","avatar_url":"https://github.com/rajyraman.png","language":"Bicep","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Logic Apps + azd to connect with Dataverse\n\n[![Open in GitHub Codespaces](https://img.shields.io/static/v1?style=for-the-badge\u0026label=GitHub+Codespaces\u0026message=Open\u0026color=brightgreen\u0026logo=github)](https://github.com/codespaces/new?hide_repo_select=true\u0026ref=main\u0026repo=654787536\u0026machine=standardLinux32gb\u0026devcontainer_path=.devcontainer%2Fdevcontainer.json\u0026location=WestUs2)\n[![Open in Remote - Containers](https://img.shields.io/static/v1?style=for-the-badge\u0026label=Remote%20-%20Containers\u0026message=Open\u0026color=blue\u0026logo=visualstudiocode)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/rajyraman/azd-logicapps-dataverse)\n\nThis is a sample repo that shows how to use Bicep to create Logic App and associated resources to connect with Dataverse. This application uses the Azure Developer CLI (azd) to deploy all the resources.\n\n### Prerequisites\n\nThe following prerequisites are required to use this application. Please ensure that you have them all installed locally.\n\n- [Azure Developer CLI](https://aka.ms/azd-install)\n- [.NET SDK 6.0](https://dotnet.microsoft.com/download/dotnet/6.0)\n- [Azure Functions Core Tools (4+)](https://docs.microsoft.com/azure/azure-functions/functions-run-local)\n- [Node.js with npm (16.13.1+)](https://nodejs.org/)\n\n### Demo\nYou can watch https://www.youtube.com/watch?v=BjI4OlNKfh4 for the demo.\n\n### Checklist\n- [ ] Create new App Registration using `pac admin create-service-principal`\n- [ ] Note down the Application Id and Secret for the App Registration\n- [ ] Add the new App Registration as an Application User in Dataverse Environment and assign correct security role\n- [ ] Run `azd init -t rajyraman/azd-logicapps-dataverse`\n- [ ] Run `azd env new [ENV NAME]`\n- [ ] Fill values for ALLOWED_LOCATIONS, DATAVERSE_APPLICATION_ID, DATAVERSE_APPLICATION_SECRET and DATAVERSE_URL in the .env file\n- [ ] Run `azd provision` and `azd deploy` or just `azd up`\n\n### Quickstart\nThe first step is to download the template on your local machine. For this you need to run the command below.\n\n`azd init -t rajyraman/azd-logicapps-dataverse`\n\nYou can choose the environment name here.\n\n![Environment name](images/azd-init.png)\n\nYou can also create a new environment using the command below.\n\n`azd env new azd-logicapps-dataverse-test`\n\nNow go the `.env` file in the environment folder and create the values for the parameters.\n\n![Environment file](images/environments.png)\n\nThese values will be used in the bicep files. Example file below.\n\n```\nALLOWED_LOCATIONS=\"australiaeast,australiasoutheast\"\nAZURE_ENV_NAME=\"azd-logicapps-dataverse-dev\"\nAZURE_LOCATION=\"australiasoutheast\"\nDATAVERSE_APPLICATION_ID=\"d3b50372-d7d0-497e-b783-8987250b743d\"\nDATAVERSE_APPLICATION_SECRET=\"abcdefgh\"\nDATAVERSE_URL=\"https://environment.crm.dynamics.com\"\n```\n\nNow that you have everything ready you can start provisioning the resources using `azd provision`. Another option is to provision resource and deploy Logic Apps code using `azd up` command. These commands will create and configure all necessary Azure resources - including access policies for Logic Apps to use the Dataverse service connection.\n\nYou can create a new App Registration using az CLI, Azure Portal or even Power Platform CLI. Power Platform CLI method is the easiest. The App Registration can used for both Easy Auth token acquistion to lock down the Logic Apps trigger and also connect with Dataverse. The new App Registration has to be added as an Application User to the Dataverse environment because the API connection is using the ApplicationId/Secret to connect with Dataverse.\n\n![Create Service Principal](images/create-service-principal.png)\n\nYou also need to add a new scope for the created App Registration that will be used for EasyAuth. In my registration I have called this scope _LogicApps.Run_\n\n![API Scope](images/api_scope.png)\n\nOne more step is to audience claim to JWT Access Token\n\n![Audience Token](images/audience_token.png)\n\nTo run and test the Logic Apps Standard inside VSCode, you'll also need to create local.settings.json file inside [src](./src/) folder.\n\n```json\n{\n  \"IsEncrypted\": false,\n  \"Values\": {\n    \"AzureWebJobsStorage\": \"UseDevelopmentStorage=true\",\n    \"FUNCTIONS_WORKER_RUNTIME\": \"node\",\n    \"WORKFLOWS_RESOURCE_GROUP_NAME\": \"rg-azd-logicapps-dataverse\",\n    \"WORKFLOWS_LOCATION_NAME\": \"australiasoutheast\",\n    \"DATAVERSE_URL\": \"https://environment.crm.dynamics.com\"\n}\n```\n\n### Running Logic App from Postman\n\nMake a note of the trigger URL from the Logic Apps page in Azure Portal and strip out the SAS token from the URL because we need to run the Logic Apps using the Bearer token. Below is how you can run this on Postman. Make sure that you have the right scope, Authorisation URL and Access Token URL\n\n![Postman](images/postman.png)\n\nBelow is the body of the request that has to be sent to the Logic App.\n![Postman](images/postman_body.png)\n\n### Architecture\n\n![Architecture](images/architecture.png)\n\n### References\n1. https://github.com/pamelafox/fastapi-azure-function-apim\n2. https://github.com/Azure-Samples/function-app-arm-templates\n3. https://github.com/marnixcox/logicapp-standard-func\n4. https://techcommunity.microsoft.com/t5/integrations-on-azure-blog/trigger-workflows-in-standard-logic-apps-with-easy-auth/ba-p/3207378\n5. https://www.youtube.com/watch?v=tawHXz6qGQI\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frajyraman%2Fazd-logicapps-dataverse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frajyraman%2Fazd-logicapps-dataverse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frajyraman%2Fazd-logicapps-dataverse/lists"}