Azure-Samples / Azure-Time-Series-Insights

Sample modules written in different languages that can be used as templates for applications needing to query Time Series Insights
MIT License
21 stars 31 forks source link

Authenticate to TSI (payg) via MSAL instead of ADAL #30

Open lyrana opened 3 years ago

lyrana commented 3 years ago

Please provide us with the following information:

This issue is for a: (mark with an x)

- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [X ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Add documentation on when to use which endpoint:

The TSI environment that I want to query, is in an Azure Directory in which my account is added as a guest account. When I execute the code above, I get a generic login prompt, but when I execute your code, I get the more specific logon prompt for the company in which I'm a guest.

So it seems to be that the authority provider that is used is quite important. It would be nice to know what the differences are in those authority providers, and when to use what.

The authority provider from your example: https://login.windows.net/{authenticationSettings.TenantId} The authority provider that I was using: https://login.windows.net/common/oauth2/authorize

Add an example of using MSAL for .NET Core

Update to add example for an interactive token retrieval sample using MSAL in .NET Core.


Thanks! We'll be in touch soon.