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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Upload bacpac file to LCS asset library issue

(0) ShareShare
ReportReport
Posted on by
Hello,
 
I am trying to upload the .bacpac file from my local drive to LCS asster library, and I am end with an error which does not have much details. Please help if anybody have solutions. Please let me know if any further questions.
 
Here is the error I am receiving on console:
[17:15:56][Start-LcsUploadV2] Something went wrong while working against the LCS API. | Response status code does not indicate success: 500 (Internal Server Error).
WARNING: [17:15:56][Start-LcsUploadV2] Stopping because of errors
 
Here is the code:
I have the same question (0)
  • Suggested answer
    Kevin Xia Profile Picture
    Microsoft Employee on at
    Hi,
    500 Internal server error, most probably means something went wrong in code. So we need to know what is the message that comes with this 500 error. I noticed that you're already using try and catch blocks, are you catching the error correctly? Try to catch errors with try and catch so we can see which piece of code is wrong.
    Best regards,
    Kevin
  • CU09081210-0 Profile Picture
    on at
     
    HI Kevin,
     
    Thanks for your reply.
     
    Catch block is not executing in this case. Seems Invoke-D365LcsUpload is using some internal function called "Start-LcsUploadV2" which is causing the issue. 
    Start-LcsUploadV2 is handled the error by source code. my code is not throwing any error. I am passing all necessary information which is required for cmdlet.
     
    Regards
  • Dieter Profile Picture
    127 on at
    Running into the same issue.
    Here's a little more information as to why the error occurs, when adding the -Verbose flag:
     
    Still not very helpful, something with payload...?
     
    When adding the below parameter to the Invoke-D365LcsUpload statement: 
    -EnableException $true
    The error shows:
     
    After adding a value for the "RetryTimeout" on which it's complaining, the process still fails, with a similar error:
     
     
    I still don't know why this is occurring...
     
    This is my command:
    Invoke-D365LcsUpload -ProjectId $projectId -BearerToken "Bearer $($token.access_token)" -FilePath $LcsAssetFilePath -FileType "DataPackage" -Name "testbacpacupload" -Filename "backup.bacpac" -FileDescription $LcsAssetDescription -LcsApiUri "https://lcsapi.lcs.dynamics.com" -RetryTimeout "00:01:00" -EnableException $true -Verbose
     
     

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 467 Super User 2025 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 420 Most Valuable Professional

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 241 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans