I'm trying to obtain an authorization code and token to access a time series environment.
I created an application in Azure Active Directory and gave it access to the time series environment by following the instructions in this link. After that I got my client_id (Application Id) , client_secret (Application Key) and my tenant id.
Then I tried to follow the instructions in this link and I'm trying to obtain the authentication code for the resource "https://api.timeseries.azure.com/" in my browser. The address that I insert in my browser is something like this:
https://login.microsoftonline.com/{tenant}/oauth2/authorize?client_id={client_id}&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%2F&response_mode=query&resource=https%3A%2F%2Fapi.timeseries.azure.com%2F&state=12345
I tripled checked the values and it seems to me that everything is correct, but I keep getting the following error in my browser:
AADSTS65005: Invalid resource. The client has requested access to a resource
which is not listed in the requested permissions in the client's application
registration. Client app ID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. Resource
value from request: https://api.timeseries.azure.com/. Resource app ID:
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. List of valid resources from app
registration: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
Thanks for any help.