Skip to main content

Notifications

Community site session details

Community site session details

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

I am trying to do a Export excel.

(4) ShareShare
ReportReport
Posted on by 112
So this is working perfect. But I am getting an error when the Onedrive is setup in the business central 
 
So, I tried to debug the issue, at last I got to know that this is because of Onedrive setup. but I am unable to troubleshoot it.
In openExcell line its triggering the error.
So when its trying to get the Default Location, its getting an error
In debugging I got the ResponseErrorDetails
 
'{"error":{"code":"BadRequest","message":"Current authenticated context is not valid for this request. This occurs when a request is made to an endpoint that requires user sign-in. For example, /me requires a signed-in user. Acquire a token on behalf of a user to make requests to these endpoints. Use the OAuth 2.0 authorization code flow for mobile and native apps and the OAuth 2.0 implicit flow for single-page web apps.","innerError":{"date":"2025-04-21T13:02:48",".........
 
this is the call stack 
 
Can anyone help me or any suggestions , how can we troubleshoot this issue.
 
 
  • Suggested answer
    Khushbu Rajvi. Profile Picture
    16,372 Super User 2025 Season 1 on at
  • Suggested answer
    Jainam M. Kothari Profile Picture
    7,938 on at
  • Suggested answer
    YUN ZHU Profile Picture
    83,249 Super User 2025 Season 1 on at
    I am trying to do a Export excel.
    Hi, hope the following helps.
    Dynamics 365 Business Central: How to use Excel Buffer to Export data
     
    Thanks.
    ZHU

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

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

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 1,014

#2
YUN ZHU Profile Picture

YUN ZHU 950 Super User 2025 Season 1

#3
Mansi Soni Profile Picture

Mansi Soni 624

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans