-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot get Token from LCS #727
Comments
As late as yesterday, I was working with the Get-D365LcsApiToken myself. My version is: 0.6.77 If you receive ANY error codes starting with "AADSTS" - I would trust the error message, as this comes directly from the Azure AD, that the cmdlet is trying to authenticate against. The authentication request goes towards: https://login.microsoftonline.com/common/oauth2/token With that said, we have seen that 3. party identity tools like OKTA has been implemented, which would break the tools - or the expected authentication flow. The community has seen things like this: https://www.yammer.com/dynamicsaxfeedbackprograms/threads/1174941179609088 Extracted comment from the yammer thread:
Regarding that statement, I'm guessing that you are running the official Microsoft task, that can be installed into the Azure DevOps organization - right? We don't quiet know what requirements that the Microsoft task has in terms of specific settings for the Application Registration (ClientId), but personally I have seen different things that needed adjustments of the settings "inside" the Application Registration (manifest). This varies very much, based on what the Azure AD administrators in your organization has configured. I know that I had to set this to true once, with a customer: oauth2AllowIdTokenImplicitFlow Here is a valid manifest file from my own Azure AD, that you can compare to your own manifest file.
|
@kblacquiere Did you get this working? Or do you have further questions or comments on this? |
Will close in 7 days if no new information is provided |
Hello, It is not working but we think it's because we are using an AD account that is coming from our on premise infrastructure. There is syncronization between On premise AD and Azure AD . We will try with a pure Azure Ad account and see if it make a difference. We will keep you posted. Thanks |
@Splaxi Could you close the issue? @kblacquiere Did you get it to work with a pure Azure AD account? Feel free to post further information, even if we close the issue. Others might benefit from your experiences. |
Hello, I'm trying to call Get-D365LcsApiToken with -ClientId XXXX -UserName uuuuu -Password pppp -LcsApiUri https://lcsapi.lcs.dynamics.com .
But we are receiving : "invalid_grant","error_description":"AADSTS50126: Error validating credentials due to invalid username or password.
I know that the username password are good because I am login into LCS Web Portal and it works ClientID is also Good because We are using Upload Package using LCS in DEVOPS and everything works ...
But we had to change or script few months ago to use MSAL for authentication.
So, I suspect that we have the problem trying to authenticate with d365fo.tools becaue of MSAL ...
Am I right ?
Do you have an idea how to fix this ?
Thanks in advance for you help !
The text was updated successfully, but these errors were encountered: