Hello @PIERANDREI MARCO , Thanks for reaching out to us.
Do you see any browser opened when you run the sample app, to enter your credentials -UserID & Password?
Are you using the latest Azure.Identity1.2.2 version NuGet package?
Please verify the AAD app Authentication section?
Also please refer to this latest Gihub issue where we discussed various scenarios to resolve similar issues: Help Troubleshooting: Azure.Identity.AuthenticationFailedException