{"id":26981,"date":"2021-02-27T11:59:46","date_gmt":"2021-02-27T11:59:46","guid":{"rendered":"https:\/\/www.inogic.com\/blog\/?p=26981"},"modified":"2021-02-27T11:59:46","modified_gmt":"2021-02-27T11:59:46","slug":"how-to-retrieve-dynamics-365-ce-entity-table-metadata-through-power-automate-flow","status":"publish","type":"post","link":"https:\/\/www.inogic.com\/blog\/2021\/02\/how-to-retrieve-dynamics-365-ce-entity-table-metadata-through-power-automate-flow\/","title":{"rendered":"How to Retrieve Dynamics 365 CE Entity\/Table Metadata through Power Automate (FLOW)"},"content":{"rendered":"<h2>Introduction<\/h2>\n<p style=\"text-align: justify;\">In this blog, we will explore how we can retrieve Dynamics 365 CE Entity\/Table Metadata using Power Automate (Microsoft Flow).<\/p>\n<p style=\"text-align: justify;\">In some scenarios, we need to retrieve the entity metadata. For example, let\u2019s say we want to get the Primary Attribute\/Column\u2019svalue of the entity which is selected in the \u2018Regarding\u2019 field of the Email dynamically. For this, we need to retrieve the entity metadata of that entity since regarding can be any entity and for each entity primary attribute name might be different.<\/p>\n<p style=\"text-align: justify;\">In the Common Data Service (Current Environment) Connector, we do not have any direct action\/step to get\/identify the \u2018Primary Attribute\u2019 field of an entity.<\/p>\n<p style=\"text-align: justify;\">But, fortunately, we can use the Invoke an HTTP request action of HTTP with Azure AD connector to read entity metadata.<\/p>\n<p><a href=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/02\/1-Retrieve-Dynamics-365-CE-EntityTable-Metadata-through-Power-Automate.jpeg\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" class=\"aligncenter wp-image-26982 size-full\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/02\/1-Retrieve-Dynamics-365-CE-EntityTable-Metadata-through-Power-Automate.jpeg\" alt=\"Retrieve Dynamics 365 CE EntityTable Metadata through Power Automate\" width=\"747\" height=\"449\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/02\/1-Retrieve-Dynamics-365-CE-EntityTable-Metadata-through-Power-Automate.jpeg 747w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/02\/1-Retrieve-Dynamics-365-CE-EntityTable-Metadata-through-Power-Automate-300x180.jpeg 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/02\/1-Retrieve-Dynamics-365-CE-EntityTable-Metadata-through-Power-Automate-660x397.jpeg 660w\" sizes=\"(max-width: 747px) 100vw, 747px\" \/><\/a><\/p>\n<p style=\"text-align: justify;\">This connector allows us to send HTTP requests to Dynamics 365 CRM or CDS without having to perform any additional authentication process. Also, no Azure App registrations or bearer tokens required.<\/p>\n<p style=\"text-align: justify;\">Given below are the steps to retrieve Entity Metadata using Power Automate:<\/p>\n<p style=\"text-align: justify;\">1. Add an Invoke an HTTP request action by searching HTTP with Azure AD in your flow as shown in the below screenshot:<\/p>\n<p><a href=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/02\/2-Retrieve-Dynamics-365-CE-EntityTable-Metadata-through-Power-Automate.jpeg\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" class=\"aligncenter wp-image-26983 size-full\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/02\/2-Retrieve-Dynamics-365-CE-EntityTable-Metadata-through-Power-Automate.jpeg\" alt=\"Retrieve Dynamics 365 CE EntityTable Metadata through Power Automate\" width=\"731\" height=\"551\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/02\/2-Retrieve-Dynamics-365-CE-EntityTable-Metadata-through-Power-Automate.jpeg 731w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/02\/2-Retrieve-Dynamics-365-CE-EntityTable-Metadata-through-Power-Automate-300x226.jpeg 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/02\/2-Retrieve-Dynamics-365-CE-EntityTable-Metadata-through-Power-Automate-660x497.jpeg 660w\" sizes=\"(max-width: 731px) 100vw, 731px\" \/><\/a><\/p>\n<p style=\"text-align: justify;\">2. Now, enter the base URL of your Dynamics 365 instance into the Base Resource URL and Azure AD Resource URI (Application ID URI) fields\u2019 i.e. https:\/\/.crm.dynamics.com. Next, click on Sign in.<\/p>\n<p><a href=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/02\/3-Retrieve-Dynamics-365-CE-EntityTable-Metadata-through-Power-Automate.jpeg\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" class=\"aligncenter wp-image-26984 size-full\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/02\/3-Retrieve-Dynamics-365-CE-EntityTable-Metadata-through-Power-Automate.jpeg\" alt=\"Retrieve Dynamics 365 CE EntityTable Metadata through Power Automate\" width=\"749\" height=\"460\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/02\/3-Retrieve-Dynamics-365-CE-EntityTable-Metadata-through-Power-Automate.jpeg 749w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/02\/3-Retrieve-Dynamics-365-CE-EntityTable-Metadata-through-Power-Automate-300x184.jpeg 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/02\/3-Retrieve-Dynamics-365-CE-EntityTable-Metadata-through-Power-Automate-660x405.jpeg 660w\" sizes=\"(max-width: 749px) 100vw, 749px\" \/><\/a><\/p>\n<p style=\"text-align: justify;\">3. Now, fill in the required fields. Set the Method to \u2018GET\u2019 and enter Url of the request along with the OData query parameters as below:<\/p>\n<p style=\"text-align: justify;\">Here, we are getting entity name dynamically i.e., from the \u2018Regarding\u2019 field of our previous Email action.<\/p>\n<p><a href=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/02\/4-Retrieve-Dynamics-365-CE-EntityTable-Metadata-through-Power-Automate.jpeg\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" class=\"aligncenter wp-image-26985 size-full\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/02\/4-Retrieve-Dynamics-365-CE-EntityTable-Metadata-through-Power-Automate.jpeg\" alt=\"Retrieve Dynamics 365 CE EntityTable Metadata through Power Automate\" width=\"824\" height=\"394\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/02\/4-Retrieve-Dynamics-365-CE-EntityTable-Metadata-through-Power-Automate.jpeg 824w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/02\/4-Retrieve-Dynamics-365-CE-EntityTable-Metadata-through-Power-Automate-300x143.jpeg 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/02\/4-Retrieve-Dynamics-365-CE-EntityTable-Metadata-through-Power-Automate-768x367.jpeg 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/02\/4-Retrieve-Dynamics-365-CE-EntityTable-Metadata-through-Power-Automate-660x316.jpeg 660w\" sizes=\"(max-width: 824px) 100vw, 824px\" \/><\/a><\/p>\n<p style=\"text-align: justify;\">Note: If you enter the full URL in the above \u201cUrl of the request\u201d field, then it must match the Base resource URL set in the connection. For e.g., in our case &#8211;<\/p>\n<p>https:\/\/crmorg6.crm.dynamics.com\/api\/data\/v9.2\/EntityDefinitions?$select=IsDocumentManagementEnabled, PrimaryNameAttribute, LogicalName,EntitySetName&amp;$filter=EntitySetName eq &#8216;accounts\u2019<\/p>\n<p style=\"text-align: justify;\">4. Save your flow and then trigger it. On a successful run, you can inspect the retrieved metadata as shown in the below screenshot:<\/p>\n<p><a href=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/02\/5-Retrieve-Dynamics-365-CE-EntityTable-Metadata-through-Power-Automate.jpeg\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" class=\"aligncenter wp-image-26986 size-full\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/02\/5-Retrieve-Dynamics-365-CE-EntityTable-Metadata-through-Power-Automate.jpeg\" alt=\"Retrieve Dynamics 365 CE EntityTable Metadata through Power Automate\" width=\"677\" height=\"643\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/02\/5-Retrieve-Dynamics-365-CE-EntityTable-Metadata-through-Power-Automate.jpeg 677w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/02\/5-Retrieve-Dynamics-365-CE-EntityTable-Metadata-through-Power-Automate-300x285.jpeg 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/02\/5-Retrieve-Dynamics-365-CE-EntityTable-Metadata-through-Power-Automate-660x627.jpeg 660w\" sizes=\"(max-width: 677px) 100vw, 677px\" \/><\/a><\/p>\n<h2>Conclusion<\/h2>\n<p style=\"text-align: justify;\">In this way, by using Power Automate you can successfully retrieve Dynamics 365 CE Entity\/Table Metadata.<\/p>\n<p><a href=\"https:\/\/www.inogic.com\/product\/integrations\/inolink-quickbooks-microsoft-dynamics-crm\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" class=\"aligncenter wp-image-26989 size-full\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/02\/inolink.jpg\" alt=\"inolink\" width=\"800\" height=\"200\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/02\/inolink.jpg 800w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/02\/inolink-300x75.jpg 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/02\/inolink-768x192.jpg 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/02\/inolink-660x165.jpg 660w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction In this blog, we will explore how we can retrieve Dynamics 365 CE Entity\/Table Metadata using Power Automate (Microsoft Flow). In some scenarios, we need to retrieve the entity metadata. For example, let\u2019s say we want to get the Primary Attribute\/Column\u2019svalue of the entity which is selected in the \u2018Regarding\u2019 field of the Email\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.inogic.com\/blog\/2021\/02\/how-to-retrieve-dynamics-365-ce-entity-table-metadata-through-power-automate-flow\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":13,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[16,19,1985],"tags":[2165,2007,1975,2163,2164],"class_list":["post-26981","post","type-post","status-publish","format-standard","hentry","category-dynamics-365","category-dynamics-crm","category-power-automate","tag-current-environment","tag-dynamics-365-power-automate","tag-power-automate","tag-retrieve-dynamics-365-ce-entity","tag-table-metadata"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/26981","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/comments?post=26981"}],"version-history":[{"count":0,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/26981\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/media?parent=26981"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/categories?post=26981"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/tags?post=26981"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}