Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Suggested answer

Upload file to LCS Asset Library with D365 Tools

Posted on by 1,858

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.

  • MYGz Profile Picture
    MYGz 1,858 on at
    RE: Upload file to LCS Asset Library with D365 Tools

    It worked finally.

    2022_2D00_07_2D00_10-19-06-00.png

  • MYGz Profile Picture
    MYGz 1,858 on at
    RE: Upload file to LCS Asset Library with D365 Tools

    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

  • nunomaia Profile Picture
    nunomaia 10,684 Super User 2024 Season 1 on at
    RE: Upload file to LCS Asset Library with D365 Tools

    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
    MYGz 1,858 on at
    RE: Upload file to LCS Asset Library with D365 Tools

    Doesn't seems related?

  • nunomaia Profile Picture
    nunomaia 10,684 Super User 2024 Season 1 on at
    RE: Upload file to LCS Asset Library with D365 Tools

    Check github.com/.../153

  • MYGz Profile Picture
    MYGz 1,858 on at
    RE: Upload file to LCS Asset Library with D365 Tools

    Hi nunomaia 

    Getting error

    pastedimage1657306236309v1.png

  • Suggested answer
    nunomaia Profile Picture
    nunomaia 10,684 Super User 2024 Season 1 on at
    RE: Upload file to LCS Asset Library with D365 Tools

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

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

New! Quick response templatesâš¡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,228 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,056 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans