Hi,
I have 2 tenants.
For one tenant, the sample code (http://code.msdn.microsoft.com/Write-Sample-App-for-79e55502) is working fine, for the other it keeps saying "Unauthorized request" for all kind of queries.
Apparently it's not an issue with serviceprincipalNames as for both, I have created them with CreateServicePrincipal.ps1 (and tried several).
The tenant which fails has particularities:
- Educational tenant
- tenant which was synchronized through dirsync then dirsync uninstalled.
- tenant which had ADFS installed then uninstalled.
Any idea of what could cause it to fail?