Today we lost some investigating why we couldn’t authenticate a WinForms app using ADAL to Azure AD.
Here is the code we were using:
And here is the exception we got:
AADSTS50001: The application named .onmicrosoft.com/sample">https://<resource>.onmicrosoft.com/sample was not found in the tenant named <tenant>.onmicrosoft.com. This can happen if the application has not been installed by the administrator of the tenant or consented to by any user in the tenant. You might have sent your authentication request to the wrong tenant.
Trace ID: a1b52908-f2c8-4f9d-aabb-e0050ff9ca0c
Correlation ID: 9f0ec9de-2f32-47b2-9d25-11333b2bd1d6
Timestamp: 2016-08-26 10:22:17Z
If you see the error above, triple check your configuration values. Almost all the time this means you have a typo somewhere causing Azure not to find the correct information. In our situation we had a typo in the APP ID URI…