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 file to LCS Asset Library with D365 Tools

(0) ShareShare
ReportReport
Posted on by 2,162

Hi,

I'm trying to upload a file to Asset Library via D365 Tools in powershell.

How to obtain the BearerToken?

here's the example from the command "Get-Help Invoke-D365LcsUpload -Examples"

 

PS C:\>Invoke-D365LcsUpload -ProjectId 123456789 
                -BearerToken "Bearer JldjfafLJdfjlfsalfd..." 
                -FilePath "C:\temp\d365fo.tools\Release-2019-05-05.zip" 
                -FileType "SoftwareDeployablePackage" 
                -Name "Release-2019-05-05" 
                -Filename "Release-2019-05-05.zip"
                -FileDescription "Build based on sprint: SuperSprint-1" 
                -LcsApiUri "https://lcsapi.lcs.dynamics.com"

Appreciate any tips.

Thanks.

I have the same question (0)
  • Suggested answer
    nunomaia Profile Picture
    25 Moderator on at

    If you are using PowerShell d365fo.tools, you can get the token using command Get-D365LcsApiToken.

  • MYGz Profile Picture
    2,162 on at

    Hi nunomaia 

    Getting error

    pastedimage1657306236309v1.png

  • nunomaia Profile Picture
    25 Moderator on at

    Check github.com/.../153

  • MYGz Profile Picture
    2,162 on at

    Doesn't seems related?

  • nunomaia Profile Picture
    25 Moderator on at

    This topic is not related no D365 but to a tool of github, you can open a query in github fot that.

    But the error message is related to a missing env variable in your environment.  

  • MYGz Profile Picture
    2,162 on at

    d365fo.tools seems  to be broken, somethings not right. Even though I downloaded latest update.

    I could get the bearer token from postman

    pastedimage1657327097218v1.png

  • MYGz Profile Picture
    2,162 on at

    It worked finally.

    2022_2D00_07_2D00_10-19-06-00.png

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
Martin Dráb Profile Picture

Martin Dráb 584 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 254 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans