<turbo-stream action="update" target="wiki_card"><template>
<h1>Microsoft Dynamics 365 Business Central, OData</h1>
<p>Support for MS Dynamics NAV using OData. Both reading data and writing (insert, update and delete) are supported.<br><br>We support Azure-based installation and also Microsoft-hosted (Microsoft online) deployments and local installations.<br><br><em>Related Article </em>-<a href="https://wiki.myrapidi.com/wiki/reading_api_pages_in_business_central" data-turbo="true" data-turbo-stream="true" data-controller="wiki" data-action="wiki#updateUrl"> How to Read API Pages via the Business Central ODATA connection</a>.<br><br></p><p><strong>The following versions of MS Dynamics NAV are supported:<br></strong><br></p><ul><li>Microsoft Dynamics 365 Business Central</li><li>MS Dynamics NAV 2018</li><li>MS Dynamics NAV 2017</li><li>Microsoft Dynamics 365 Business Edition</li><li>MS Dynamics NAV 2016 (read-only)</li></ul><p><strong>Additional installation (only for local installations or if you control the Azure instance)<br></strong><br></p><p></p><div class="section_header"><div class="line"> <div class="column_blindupdown" data-controller="wiki" data-wiki-target="blindupdown"><a data-turbo="true" data-turbo-stream="true" href="/wiki/installing_the_rapidiconnector?inline=1&amp;parent_page_ids=3704&amp;child_page_id=198"><img class="blindupdown_show" id="show_wiki_3704_subpage_198_info" title="Show information" alt="Show information" src="/assets/gfx/showinfo-dfd75ef684363d1bd0e344be999155542dc15232a93cd61188484b8ca2bd07eb.gif"></a><img id="hide_wiki_3704_subpage_198_info" class="blindupdown_hide" title="Hide information" alt="Hide information" src="/assets/gfx/hideinfo-6e9943c0a2751c6dd2904a66f74a8591ed3d5fcd13413b704851ee06b53c4b51.gif"></div><div>Installing the RapidiConnector</div></div></div><div class="section_detail" id="wiki_3704_subpage_198_info"></div><br><br><p></p><p><strong>Please Note:</strong> The OData Connection is by default created with an attached RapidiConnector. If you don't need the RapidiConnector - if you want Rapidi to connect directly to your OData system - you need to delete the RapidiConnector from the Connection (click the trashcan icon (Delete RapidiConnector) all the way to the right on the RapidiConnector header).&nbsp;<br><br></p><p><strong>Configuration<br></strong><br></p><p>Below is a description of the fields on the Connection:<br><br></p><ul><li><strong>Code:</strong> The unique code for this connection (cannot be changed)</li><li><strong>Description: </strong>Enter a text describing the Connection.</li><li><strong>Authentication Type:</strong> Choose howto authenticate with your MS Dynamics 365 system. Normally you would choose "OAuth2 (Azure AD)" here and specify the connection parameters and credentials as described below.</li><li><strong>Server Connect:</strong> Specify the full path to your Dynamics 365 system - like "https://roimg027.cloudapp.net:7048/NAV/ODataV4/Company('CRONUS%20International%20Ltd.')/Customer"<br>for D365 BC it would be like: https://api.businesscentral.dynamics.com/v1.0/daf1fa9d-33cf-4c18-99xx-9b04xxxx0af2/api/beta/companies (please use your own tenant id)</li><li><strong>Company:</strong> Specify the NAV company that this connection should use - like "CRONUS International Ltd." (Please note that this field is case sensitive). You need to create a Connection for each Company in NAV that you want to read or write data from/to.<br>For D365 BC you need to use the id of the company - not the name. You can get the id by leaving this field blank and use the TEST button. This will give you a list of all Company id's in your D365 BC.</li><li><strong>UserID:</strong> Here you specify the userid (credentials) to access your Dynamics 365. When using the OAuth2 authentication, this is the ApplicationID of the App created in the Azure AD.</li><li><strong>Password:</strong> Here you specify the Password corresponding to the above UserID. For OAuth2, this is the Key found on the App created in the Azure AD.</li><li><strong>Domain:</strong> The Domain for Authentication. For OAuth2, this is the Tenant ID of your Azure AD.</li><li><strong>Resource:</strong> This field is only used for OAuth2 authentication. Specify here the resource (the Application ID of the App in your Azure AD that you want to have access to - e.g. your Dynamics 365 system).</li><li><strong>Metadata URL:</strong> Here you can specify the URL to the metadata for your Dynamics 365 - like "https://ROIMG008.cloudapp.net:7048/Rapidi/ODataV4/$metadata"<br>or for D365 BC: https://api.businesscentral.dynamics.com/v1.0/daf1fa9d-33cf-4c18-99xx-9b04xxxx0af2/api/beta/$metadata</li><li><strong>Use SSL:</strong> Check this field if the connection should use SSL (this setting dictates if SSL is used independently of specifying http or https above).</li></ul><p><strong>Configuration in Azure Portal<br></strong><br></p><ol><li>Login to portal.azure.com</li><li>Go To <strong>Microsoft Entra ID</strong></li><li>Go To <strong>App Registrations</strong></li><li>Click <strong>+ New registration</strong><ul><li>Name = [your App Name] (Example: <strong>RapidiBCApp</strong>)&nbsp;</li><li>[Section] Supported account types &gt; Select :&nbsp; ... <strong>Single tenant</strong></li><li><strong>Redirect URI (optional) </strong>- <strong>Select Web</strong> and paste the following url:<br><strong><em>https://businesscentral.dynamics.com/OAuthLanding.htm</em></strong></li><li><strong>Click Register</strong></li></ul></li><li>&nbsp;Within same screen&nbsp;<ul><li>&nbsp;On the API permissions page for your app, click the Add a permission button.&nbsp;</li><li>&nbsp;Make sure the <strong>Microsoft APIs</strong> tab is selected. In the <em>Commonly used Microsoft APIs</em> section, click on the <strong>Dynamics 365 Business Central</strong> and select <strong>Delegated permissions</strong>.&nbsp;</li><li>Ensure that the right permissions are checked: <br><strong>user_impersonation</strong> and <strong>Financials.ReadWrite.All</strong></li><li>&nbsp;Under <strong>Application permissions</strong> tab make sure you check both options:<br><strong>Dynamics 365 Business Central</strong> / <strong>Automation.ReadWrite.All</strong> and<br><strong>Dynamics 365 Business Central</strong> / <strong>API.ReadWrite.All</strong></li><li>Click the <strong>Add permissions</strong> button.&nbsp;</li><li>You will be returned to the previous screen, and there you have to click <strong>Grant Admin Consent for ...</strong>. click there.&nbsp;</li></ul></li><li>Within same screen, From the Certificates &amp; secrets page, in the Client secrets section, choose <strong>New client secret</strong>:&nbsp;</li></ol><ul><li>Type a key description (of instance app secret),&nbsp;</li><li>Select a key duration of either In 1 year, In 2 years, or Never Expires.&nbsp;</li><li>When you press the Add button, the key value will be displayed, copy it, and save the value in a <strong>safe location</strong>.&nbsp;</li></ul><ol><li>Keep the Application Id and the Application secret in a safe location – we will need these later.&nbsp;</li></ol><p><strong>Configuration in Dynamics 365 Business Central<br></strong><br></p><p><em>Note: In order to complete below steps you need to be a Business Central admin user&nbsp;<br></em><br></p><ol><li>Login to your Business Central Environment&nbsp;</li></ol><ul><li>On the <strong>Search box</strong> – search for <strong>Microsoft Entra Applications</strong> (see the below image)&nbsp;</li></ul><p></p><div class="trix-media-container size-medium">
        <img src="/rails/active_storage/blobs/eyJfcmFpbHMiOnsiZGF0YSI6MTU5MSwicHVyIjoiYmxvYl9pZCJ9fQ==--fca8f69e217c0ab21a87d71ef97ed0af20ab9d57/MicrosoftEntraApplication.png">
      </div><br><br>Click <strong>New<br></strong><br><p></p><ul><li>For <strong>Client ID</strong> – paste the Application Id from Azure (the one that you created earlier)&nbsp;</li><li>Give it a proper description (ex. RapidiBC App)&nbsp;</li><li>Under <strong>User Groups</strong> – choose the code D365 AUTOMATION (this has most of the permissions sets) and D365 ADMINISTRATOR.&nbsp;</li><li>Click <strong>Grant Consent</strong></li></ul><p>After you have successfully granted consent for the app then search for Web services and find page 21 (Customer Card). If for some reason the page is not published then you might need to publish it first by clicking the <strong>New</strong> button, choose <strong>Page</strong> and for <strong>Object ID</strong> enter 21. <strong>Object Name</strong> will be auto populated but you have to give a <strong>Service Name</strong> (ex. CustomerCard). Please make sure the checkbox Published has to be marked as checked. Copy the <strong>Odata V4 URL</strong> link and keep it in a safe place – it will be used when setting up the connection within the MyRapidi platform.<br><br></p><p><strong>Configuration in Rapidi<br></strong><br></p><ol><li>Login to MyRapidi and navigate to the 'Connections' page and choose<strong> MS Dynamics 365 BC (NAV) OData</strong></li><li>The fields of the MS Dynamics 365 BC (NAV) OData Connection are as follows:&nbsp;</li></ol><ul><li><strong>Code</strong>: auto-populated&nbsp;</li><li><strong>Description</strong>: – type a proper description&nbsp;</li><li><strong>Authentication Type</strong>:&nbsp; Oauth2 (Azure AD)&nbsp;</li><li><strong>Server Connect</strong>: Under Web Service in BC search for the Page 21 (Customer Card). Copy the Odata v4 url from there and paste it here. Example - <a href="https://api.businesscentral.dynamics.com/v2.0/48cb7993-8a06-443e-b5ce-73c8635d0882/Sandbox/ODataV4/Company('CRONUS%20Danmark%20A%2FS')/CustomerCard">https://api.businesscentral.dynamics.com/v2.0/48cb7993-8a06-443e-b5ce-73c8635d0882/Sandbox/ODataV4/Company('CRONUS%20Danmark%20A%2FS')/CustomerCard</a></li><li><strong>Company</strong>: Enter Company Name (Please note that Company name is url encoded – you can decode it for free on this url <a href="https://www.urldecoder.org/">https://www.urldecoder.org/</a>). The company name is within the server connect link in brackets.&nbsp;</li><li><strong>User Id</strong>: This is the application Id (that was created on first step)&nbsp;</li><li><strong>Password</strong>: This is the client secret/application secret (created on the first step)&nbsp;</li><li><strong>Domain</strong>: This is the tenant id of Azure, e.g. you can find it under Server connect link, ex. <a href="https://api.businesscentral.dynamics.com/v2.0/48cb7993-8a06-443e-b5ce-73c8635d0882/Sandbox/ODataV4/Company('CRONUS%20Danmark%20A%2FS')/CustomerCard">https://api.businesscentral.dynamics.com/v2.0/48cb7993-8a06-443e-b5ce-73c8635d0882/Sandbox/ODataV4/Company('CRONUS%20Danmark%20A%2FS')/CustomerCard</a>. The tenant id is with marked with Bold.&nbsp;</li><li><strong>Resource</strong>: Enter <a href="https://api.businesscentral.dynamics.com/">https://api.businesscentral.dynamics.com/</a></li><li><strong>Metadata URL</strong>: copy from the Server Connect and modify it a bit (remove everything after OdataV4/ and add $metadata), please see below:<br><a href="https://api.businesscentral.dynamics.com/v2.0/48cb7993-8a06-443e-b5ce-73c8635d0882/Sandbox/ODataV4/$metadata">https://api.businesscentral.dynamics.com/v2.0/48cb7993-8a06-443e-b5ce-73c8635d0882/Sandbox/ODataV4/$metadata</a></li><li><strong>Use SSL</strong>: Mark it as True&nbsp;</li></ul><p><strong>Copy, Test, Activate Changes, and Read Design<br></strong><br></p><p></p><div class="section_header"><div class="line"> <div class="column_blindupdown" data-controller="wiki" data-wiki-target="blindupdown"><a data-turbo="true" data-turbo-stream="true" href="/wiki/copy_connection?inline=1&amp;parent_page_ids=3704&amp;child_page_id=3758"><img class="blindupdown_show" id="show_wiki_3704_subpage_3758_info" title="Show information" alt="Show information" src="/assets/gfx/showinfo-dfd75ef684363d1bd0e344be999155542dc15232a93cd61188484b8ca2bd07eb.gif"></a><img id="hide_wiki_3704_subpage_3758_info" class="blindupdown_hide" title="Hide information" alt="Hide information" src="/assets/gfx/hideinfo-6e9943c0a2751c6dd2904a66f74a8591ed3d5fcd13413b704851ee06b53c4b51.gif"></div><div>Copy Connection</div></div></div><div class="section_detail" id="wiki_3704_subpage_3758_info"></div><br><br><p></p><p></p><div class="section_header"><div class="line"> <div class="column_blindupdown" data-controller="wiki" data-wiki-target="blindupdown"><a data-turbo="true" data-turbo-stream="true" href="/wiki/connection_test?inline=1&amp;parent_page_ids=3704&amp;child_page_id=364"><img class="blindupdown_show" id="show_wiki_3704_subpage_364_info" title="Show information" alt="Show information" src="/assets/gfx/showinfo-dfd75ef684363d1bd0e344be999155542dc15232a93cd61188484b8ca2bd07eb.gif"></a><img id="hide_wiki_3704_subpage_364_info" class="blindupdown_hide" title="Hide information" alt="Hide information" src="/assets/gfx/hideinfo-6e9943c0a2751c6dd2904a66f74a8591ed3d5fcd13413b704851ee06b53c4b51.gif"></div><div>Connection Test</div></div></div><div class="section_detail" id="wiki_3704_subpage_364_info"></div><br><br><p></p><p></p><div class="section_header"><div class="line"> <div class="column_blindupdown" data-controller="wiki" data-wiki-target="blindupdown"><a data-turbo="true" data-turbo-stream="true" href="/wiki/activate_changes?inline=1&amp;parent_page_ids=3704&amp;child_page_id=1816"><img class="blindupdown_show" id="show_wiki_3704_subpage_1816_info" title="Show information" alt="Show information" src="/assets/gfx/showinfo-dfd75ef684363d1bd0e344be999155542dc15232a93cd61188484b8ca2bd07eb.gif"></a><img id="hide_wiki_3704_subpage_1816_info" class="blindupdown_hide" title="Hide information" alt="Hide information" src="/assets/gfx/hideinfo-6e9943c0a2751c6dd2904a66f74a8591ed3d5fcd13413b704851ee06b53c4b51.gif"></div><div>Activate Changes</div></div></div><div class="section_detail" id="wiki_3704_subpage_1816_info"></div><br><br><p></p><p></p><div class="section_header"><div class="line"> <div class="column_blindupdown" data-controller="wiki" data-wiki-target="blindupdown"><a data-turbo="true" data-turbo-stream="true" href="/wiki/read_design?inline=1&amp;parent_page_ids=3704&amp;child_page_id=363"><img class="blindupdown_show" id="show_wiki_3704_subpage_363_info" title="Show information" alt="Show information" src="/assets/gfx/showinfo-dfd75ef684363d1bd0e344be999155542dc15232a93cd61188484b8ca2bd07eb.gif"></a><img id="hide_wiki_3704_subpage_363_info" class="blindupdown_hide" title="Hide information" alt="Hide information" src="/assets/gfx/hideinfo-6e9943c0a2751c6dd2904a66f74a8591ed3d5fcd13413b704851ee06b53c4b51.gif"></div><div>Read Design</div></div></div><div class="section_detail" id="wiki_3704_subpage_363_info"></div><br><br><p></p>
</template></turbo-stream>

<turbo-stream action="replace" target="meta_description"><template><meta content='RAPIDI data integration, Connection: Microsoft Dynamics 365 Business Central, OData, Microsoft Dynamics NAV' id='meta_description' name='description'></template></turbo-stream>
<turbo-stream action="replace" target="meta_keywords"><template><meta content='Microsoft Dynamics 365 Business Central, OData BC Azure Active Directory Microsoft Entra' id='meta_keywords' name='keywords'></template></turbo-stream>
<turbo-stream action="update" target="meta_title"><template>Microsoft Dynamics 365 Business Central, OData - MyRapidi Wiki</template></turbo-stream>
<turbo-stream action="prepend" target="flash"><template></template></turbo-stream>
