Forum Discussion
Microsoft Dynamic 365 business Central API data fetch using Fabric note book
- 1 year ago
Hi kasun_rumesh ,
The Client Credentials Flow is ideal for non-interactive scenarios like Fabric notebooks. It allows your script to get an access token using just the Tenant ID, Client ID, and Client Secret, without needing user login. This is done by calling Azure AD's token endpoint with the appropriate parameters. Make sure your Azure AD app has the necessary application-level API permissions (e.g., Financials.ReadWrite.All) and that admin consent has been granted. Once the token is received, you can use it to call the Business Central API.
Thank you.
Hi kasun_rumesh ,
Thank you for reaching out to Microsoft Fabric Community.
Instead of using the interactive OAuth flow, switch to the Client Credentials Flow for automated API access. This method doesn’t require user interaction and allows you to authenticate using just your Client ID, Client Secret, and Tenant ID. The script will request an access token from Azure AD, which can then be used in API calls to Business Central. This is ideal for non-interactive scenarios like in Fabric notebooks.
Thank you.
- kasun_rumesh1 year agoHelper II
I'm bit new to this. Can you bit further explain about the Client Credentials Flow
- v-venuppu1 year agoCommunity Support
Hi kasun_rumesh ,
The Client Credentials Flow is ideal for non-interactive scenarios like Fabric notebooks. It allows your script to get an access token using just the Tenant ID, Client ID, and Client Secret, without needing user login. This is done by calling Azure AD's token endpoint with the appropriate parameters. Make sure your Azure AD app has the necessary application-level API permissions (e.g., Financials.ReadWrite.All) and that admin consent has been granted. Once the token is received, you can use it to call the Business Central API.
Thank you.