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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

Release pipeline LCS upload: Invalid OAuth token was presented

(2) ShareShare
ReportReport
Posted on by 12
Release pipeline failing to upload LCS asset task
 
 
Log file - 2026-03-19T16:02:06.3283210Z MSAL Authentication against AAD authority https://login.microsoftonline.com/organizations
2026-03-19T16:02:06.8880083Z PowerShellGet Module exists
2026-03-19T16:02:48.7070146Z Required libraries loaded
2026-03-19T16:02:48.7470113Z Fetching token from application
2026-03-19T16:02:51.3809734Z Fetched Result
2026-03-19T16:02:51.3810070Z MSAL.Desktop.4.60.4.0.MsalClientException:
2026-03-19T16:02:51.3810388Z     ErrorCode: parsing_wstrust_response_failed
2026-03-19T16:02:51.3810783Z Microsoft.Identity.Client.MsalClientException: There was an error parsing the WS-Trust response from the endpoint. 
2026-03-19T16:02:51.3811253Z This may occur if there are issues with your ADFS configuration. See https://aka.ms/msal-net-iwa-troubleshooting for more details.
2026-03-19T16:02:51.3811695Z Enable logging to see more details. See https://aka.ms/msal-net-logging.
2026-03-19T16:02:51.3812097Z    at Microsoft.Identity.Client.WsTrust.WsTrustWebRequestManager.<GetWsTrustResponseAsync>d__3.MoveNext()
2026-03-19T16:02:51.3812506Z --- End of stack trace from previous location where exception was thrown ---
2026-03-19T16:02:51.3812875Z    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
2026-03-19T16:02:51.3813299Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2026-03-19T16:02:51.3813734Z    at Microsoft.Identity.Client.WsTrust.CommonNonInteractiveHandler.<GetWsTrustResponseAsync>d__6.MoveNext()
2026-03-19T16:02:51.3814180Z --- End of stack trace from previous location where exception was thrown ---
 
 
All below points are configured correctly :-
 
(LCS Project is in Europe)
 
Categories:
I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    305,182 Super User 2026 Season 1 on at
    Moved the question from the Dynamics 365 General to the Dynamics 365 Finance forum.
     
  • Suggested answer
    Diego Mancassola Profile Picture
    896 on at
    Hello, i remember well this error.
     
    The user used to LCS connection must not have MFA.
     
  • FODev Profile Picture
    12 on at
    MFA is already disabled , I am able to login LCS from that account using password only . Still same error
  • Suggested answer
    Anton Venter Profile Picture
    20,672 Super User 2026 Season 1 on at
    The error message "Invalid OAuth token was presented" relates to the application registration used in the service connection to upload to LCS. Check and confirm that the Application client Id is correct and that it has permission on LCS as per the documentation.
     
  • FODev Profile Picture
    12 on at
     Client id is correct and Also API is granted on the App registartion page also , Still same issue
  • TalkBull Profile Picture
    35 on at
    @FODev Were you able to solve this?
    I'm experiencing exactly the same. LCS project is in EU region, MFA disabled, app registration configured as per the MS docs, etc.
  • Anthony Blake Profile Picture
    3,152 Super User 2026 Season 1 on at
    Hi @FODev
     
    Are you using a traditional release pipeline? What do your tasks look like on the release stage, do you have a step to install MSAL like this:
     
     
    What do the logs look like for the whole run, have the previous steps, e.g. instal MSAL, succeeded?
     
    Thanks,
    Anthony
     
  • Anthony Blake Profile Picture
    3,152 Super User 2026 Season 1 on at
    The other suggestions I would make are:
     
    It may sound obvious would be to replace your username and password in your service connection, validating any typos or spaces added to the password by copy/paste.
     
    Check point 3 on your prerequisites in Azure portal. Did the admin definitely grant consent?
  • TalkBull Profile Picture
    35 on at
    I've granted admin consent and re-typed the password in DevOps but still the same error.
     
    When trying to replicate using PowerShell, I managed to get a token successfully using Get-MsalToken (passing in the client Id, tenant Id, scope, and using -Interactive) and call the Invoke-D365LcsUpload manually, and this works successfully.
     
    I read that the Install MSAL.PS step isn't required anymore in the newer task versions.
  • Diego Mancassola Profile Picture
    896 on at
    Hello, have you enabled Allow public client flows?
     
    In the Azure portal, select your app in App registrations, and then select Authentication.
    In Advanced settings > Allow public client flows > Enable the following mobile and desktop flows, select Yes.
     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

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

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 694

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 584 Super User 2026 Season 1

#3
Subra Profile Picture

Subra 518

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans