microsoft / Intune-Data-Warehouse

Libraries, samples, and feedback on the Intune Data Warehouse.
MIT License
33 stars 18 forks source link

AuthenticationContext is not properly scripted #15

Open mohsenualam opened 2 years ago

mohsenualam commented 2 years ago

I was trying to build the console app using the code but kept getting errors like this: : AADSTS900023: Specified tenant identifier 'token' is neither a valid DNS name, nor a valid external domain.

It turns out the AuthenticationContext doesn't need to have the "/oauth2/token" part. After taking off that, the code works: new AuthenticationContext("https://login.windows.net/" + tenantDomain;