Error OAuth2 with AAD

Hi!
I’ve been trying to make the authorization with the Azure Active Directory and all that I could get is the same error…
image
The log give me this information:

t=2018-09-26T13:17:05+0000
lvl=eror
msg=login.OAuthLogin(NewTransportWithCode)
logger=context
userId=0
orgId=0
uname=
error="oauth2: cannot fetch token: 400 Bad Request
Response: “error”:“invalid_resource”,
“error_description”:"AADSTS50001: Resource identifier is not provided.
nTrace ID: ed53af0d-4a05-4c3e-88f6-7d2c74aec900
nCorrelation ID: b3208f25-c532-4e2b-a020-75878d69e5bf
“nTimestamp”: “2018-09-26 13:17:05Z”,
“error_codes”:[50001],
“timestamp”:“2018-09-26 13:17:05Z”,
“trace_id”:“ed53af0d-4a05-4c3e-88f6-7d2c74aec900”,
“correlation_id”:“b3208f25-c532-4e2b-a020-75878d69e5bf”

I set the response URL on my application in the AAD with HTTP and HTTPS (just in case).
Also my grafana configuration is:
VERSION: v5.2.3

#################################### Server ####################################
[server]

Protocol (http or https)

protocol = https

The ip address to bind to, empty will bind to all interfaces

http_addr = 0.0.0.0

The http port to use

http_port = 3000

The public facing domain name used to access grafana from a browser

domain = grafanadomain.com

Redirect to correct domain if host header does not match domain

Prevents DNS rebinding attacks

;enforce_domain = false

The full public facing url you use in browser, used for redirects and emails

If you use reverse proxy and sub path specify full url (with sub path)

root_url = %(protocol)s://%(domain)s:%(http_port)s/

Log web requests

;router_logging = false

the path relative working path

;static_root_path = public

enable gzip

;enable_gzip = false

https certs & key file

Anyone have anyidea how could I fix this?

Thank you so much in advance.

Any one have any idea? Help, please :frowning:

At least! I’ve found the solution! If anyone was wondering it was the scopes.
I’ve put: scopes = user:email, read:org.
And it should be: scopes = openid email name.
:crazy_face: