@Cristian Alberch Thanks for reaching out. The document has been updated to reflect the right code and it will be published soon.
On step3 of sample code here please replace the old code with the new code for Authenticate with Digital Twins
**Old Code: **
var cred = new ManagedIdentityCredential("https://digitaltwins.azure.net");
var client = new DigitalTwinsClient(
new Uri(adtInstanceUrl),
cred,
new DigitalTwinsClientOptions { Transport = new HttpClientTransport(httpClient) });
**Update Code: **
var cred = new DefaultAzureCredential();
var client = new DigitalTwinsClient(new Uri(adtInstanceUrl), cred);
Feel free to get back to me if you need any assistance.
Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.