D365 F&O recurring integration - The remote server returned an error: (403) Forbidden

PrasanthPeriyasamyIN-6360 0 Reputation points
2026-04-21T06:06:31.6266667+00:00

Hi,

we are facing a blocking issue with a recurring integration in D365 F&O production environment. It works fine in all environment but not in production.

The first import has throw this error: SysIntegrationActivityBatchTask-run. Microsoft.WindowsAzure.Storage.StorageException: The remote server returned an error: (403) Forbidden. ---> System.Net.WebException: The remote server returned an error: (403) Forbidden.

The API is: [environment url]/api/connector/dequeue/{[activit id]}?entity=[entity name]&company=[company]


Sometimes we are receiving this error. And in 2nd export, The records which was in error batch are not Exporting as expected.

How can we solve this?

Azure Storage
Azure Storage

Globally unique resources that provide access to data management services and serve as the parent namespace for the services.


1 answer

Sort by: Most helpful
  1. AI answer

    2026-04-21T06:06:54.4466667+00:00

    A 403 Forbidden in this context indicates that the storage or service endpoint the recurring integration uses is rejecting the request due to authorization or network restrictions. Since it works in all other environments and only fails in production, focus on production-specific configuration differences.

    Key areas to investigate:

    1. SAS token validity and scope
      • If the recurring integration uses Azure Storage with SAS tokens, verify in production that:
        • The SAS token is not expired.
        • The SAS token has the required permissions for the operation (read/write/list, etc.).
        • The SAS token is not constrained by an invalid sip (IP restriction) or a start time that is in the future.
      • A 403 with Azure Storage commonly occurs when the SAS is invalid, expired, or too restricted.
      • Compare the SAS configuration used in production with one from a working environment.
    2. Storage account firewall and networking
      • Check the storage account used by the recurring integration in production:
        • If “Selected networks” is enabled, ensure the outbound IP(s) of the D365 F&O production environment are allowed.
        • If access is restricted by IP or virtual network, confirm that production’s IP or VNet is included.
      • If a proxy or firewall is in the path, confirm that the proxy IP (not just the client IP) is allowed on the storage firewall.
    3. Authorization mismatch / RBAC and permissions
      • If the integration uses Azure AD / OAuth instead of SAS:
        • Confirm the service principal or managed identity used by the production environment has the correct data-plane roles on the storage account (for example, Storage Blob Data Contributor/Owner or the appropriate Files role if using Azure Files).
        • Ensure the identity has the same roles in production as in the other environments.
      • A 403 with an AuthorizationPermissionMismatch error code indicates the identity does not have the required data permissions.
    4. Environment-specific endpoint or routing issues
      • Verify that the production environment is pointing to the correct storage account/container and not to a different one with stricter security.
      • Check any custom routes, VPNs, or Azure Firewall rules that might be forcing storage traffic through a path where it is blocked or misrouted.
    5. Logging and error details
      • Enable diagnostic logging on the storage account and review the 403 entries to see the exact error code (for example, AuthorizationFailure, AuthorizationPermissionMismatch, or SAS-related messages). This will indicate whether the issue is SAS, RBAC, firewall, or something else.

    In practice, resolving this typically involves:

    • Regenerating a SAS token for production with correct permissions and without overly strict IP or start-time constraints, or
    • Adjusting storage firewall rules to include the production environment’s outbound IP/proxy IP, and/or
    • Ensuring the production identity has the same storage data-plane roles as in non-production.

    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.