Coding with the Azure Digital Twins APIs Tutorial - Invalid Client Error

Peter Gallagher 21 Reputation points MVP
2020-09-15T20:38:06.7+00:00

Running through the following tutorial here;

https://learn.microsoft.com/en-us/azure/digital-twins/tutorial-code

When I got to the Upload a Model section, I received the following error;

Azure.Identity.AuthenticationFailedException: InteractiveBrowserCredential authentication failed: A configuration issue is preventing authentication`

The request body must contain the following parameter: 'client_assertion' or 'client_secret'.`

I followed the shortlink given in the error description;

https://aka.ms/msal-net-invalid-client

And it recommended that I set Public Client to "Yes" in the AD App registration Authentication section. I did this and it resolved my issue.

I raised a pull request on the tutorial to add this is a tip;

https://github.com/MicrosoftDocs/azure-docs/pull/62592

However the developer team have replied that this may not be the actual solution.

Any ideas?

If you're interested, I was actually live streaming on twitch... Here's where I'm working on the Model upload Section;

https://www.twitch.tv/videos/740788993?t=00h08m23s

Azure Digital Twins
Azure Digital Twins
An Azure platform that is used to create digital representations of real-world things, places, business processes, and people.
231 questions
{count} votes

Accepted answer
  1. QuantumCache 20,271 Reputation points
    2020-09-21T22:05:13.32+00:00

    Hello @Peter Gallagher , Thanks for posting this question over here.

    We have validated the document walkthrough and were able to authenticate and upload the sampleModel to the Azure Digital Twins.

    As we can see in the below screenshot, we are able to authenticate and upload the SampleModel to the ADT. We followed the exact document.

    26274-image.png

    We are not treating the AAD app as a Public Client.

    26138-image.png

    Update: after investigating the issue, we found that these settings are to be maintained on the AAD app. Please add only the platform as 'Mobile and Desktop Applications' and remove any other existing Platforms, as shown in the image below.

    26651-image.png

    Please let us know if you need further help in this matter.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.