web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

Sending documents from Business Central to SharePoint

(7) ShareShare
ReportReport
Posted on by 70
Hi guys,
 
I am working on integration of Business Central with SharePoint, specifically in sending uploaded files in BC to SharePoint. I coded a function to get the token, and it succeeds, but my HTTP post function fails. This is my first time doing an integration like this, so I am not sure if I am doing this properly. Am I missing some permissions maybe? Noteworthy, I made a custom SharePoint Setup table in which I store the Client ID and Secret and the tenant ID, and also the URLs to the specific folders in SharePoint to which I want to send the file/files. Since I am new at this, any suggestion would be helpful.
I have the same question (0)
  • Suggested answer
    Nimsara Jayathilaka. Profile Picture
    4,950 Super User 2026 Season 1 on at
    Hi
     
    When integrating Business Central with SharePoint to upload files, obtaining the authentication token is only the first step. The most common reason HTTP POST calls fail is missing or misconfigured permissions—your Azure AD app must have Sites.ReadWrite.All or Files.ReadWrite.All application permissions with admin consent. Ensure the access token is issued for Microsoft Graph and includes the required scopes. The POST request must target the correct SharePoint folder URL, include the proper headers (Authorization: Bearer {token}, Content-Type: application/octet-stream), and send the file in binary format. Testing the API in tools like Postman can help isolate issues, and using Business Central’s built-in SharePoint integration module can simplify authentication and file handling.
     
     
    Thanks
    Nimsara
  • Suggested answer
    OussamaSabbouh Profile Picture
    12,878 Super User 2026 Season 1 on at
    Hello,
     
    To send files from Business Central to SharePoint:
    Use the SharePoint module in the System Application, it handles authentication and file uploads automatically.
    If using raw HTTP, enable Allow HttpClient Requests in Extension Management.
    Authenticate via OAuth2 client credentials and include the Authorization: Bearer <token> header.
    Your Entra app must have SharePoint or Graph write permissions with admin consent.
    For small files, use SharePoint REST (Files/add); for large files, use a Graph upload session.
     
    Regards, 
    Oussama 
  • Suggested answer
    Rishabh Kanaskar Profile Picture
    6,219 Super User 2026 Season 1 on at
    Hi,
     
    You can also use Power Automate with the SharePoint connector to create a file from Business Central attachments. Alternatively, configure Microsoft Graph with proper app permissions and grant access to the target site for direct uploads. 
     
    Thanks
    Rishabh
  • Suggested answer
    Aman Kakkar Profile Picture
    2,977 Super User 2026 Season 1 on at
  • Suggested answer
    YUN ZHU Profile Picture
    99,084 Super User 2026 Season 1 on at
    Hi, hope the following helps as well.
    Dynamics 365 Business Central Blog Series: Integrate Business Central with SharePoint
     
    Thanks.
    ZHU
  • LK-07050844-0 Profile Picture
    70 on at
    Hi guys, just a follow up.
     
    Now I get this error:
     
    Failed. Status: 400, Error: , LastError: An error occurred when communicating with Dataverse.

    Detailed description: One or more errors occurred. (No such host is known. (soltestprod.crm4.dynamics.com:443)).
     
    Not sure how to solve this.
  • LK-07050844-0 Profile Picture
    70 on at
    When using the debugger, this is the message I got in the response: 
    The request was blocked by the runtime to prevent accidental use of production services
  • Suggested answer
    Khushbu Rajvi. Profile Picture
    22,128 Super User 2026 Season 1 on at

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,946 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,177 Super User 2026 Season 1

#3
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 555 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans