This error message The REST service returned a status code that is not 20x - i.e. not OK - Status code received: 403 Forbidden Response body:
{"error":{"code":"Internal_ServerError","message":"Sorry, the current permissions prevented the action.(TableData 38 Purchase Header Modify: Base Application) indicates that the user or application does not have permission to perform the requested action.
The user or service account does not have permission to modify the Purchase Header table (Table ID 38) in Business Central.
This typically happens when:
Purchase Header.This is a standard security restriction in Business Central to prevent unauthorized data changes.

Solution: To resolve the error, you need to grant MODIFY permissions on TableData 38 to the integration user or service principal.
Step-by-Step Fix:
If Using a User Account:
Object Type: TableData
Object ID: 38 (Purchase Header)
Permission: Modify
Modify right on TableData 38.If Using Azure AD App (Service-to-Service Auth):
MODIFY on TableData 38).Optional Tip:
If you're unsure which permissions are required, monitor “Effective Permissions” or use Permission Recorder in Business Central to capture exactly what’s being accessed during the failing operation.
Comment Editor X