Skip to main content

Notifications

Announcements

No record found.

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,318 Super User 2025 Season 1 on at
  • Suggested answer
    Jainam M. Kothari Profile Picture
    7,921 on at
  • Suggested answer
    YUN ZHU Profile Picture
    82,673 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

🌸 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…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

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

#1
YUN ZHU Profile Picture

YUN ZHU 374 Super User 2025 Season 1

#2
Mansi Soni Profile Picture

Mansi Soni 247

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 231 Most Valuable Professional

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans