request:
https://management.azure.com/subscriptions/{{subscriptionId}}/resourceGroups/{{resourceGroups}}/providers/Microsoft.DBforMySQL/servers/{{dbhost}}/databases/{{db}}?api-version=2017-12-01
response:
{
"error": {
"code": "AuthorizationFailed",
"message": "The client 'c3ac6bdd-98c1-481e-a9cf-1b1622cb6d7c' with object id 'c3ac6bdd-98c1-481e-a9cf-1b1622cb6d7c' does not have authorization to perform action 'Microsoft.DBforMySQL/servers/databases/read' over scope '/subscriptions/91e9b0e1-a770-479d-be45-3d1e32581c09/resourceGroups/lfss-azure-eastus-rg/providers/Microsoft.DBforMySQL/servers/lf-test.mysql.database.azure.com/databases/lftdb' or the scope is invalid. If access was recently granted, please refresh your credentials."
}
}
send request vis postman and i can access azure-mysqldb via database management software.
before send request i send a Authorise Request
request:
【https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id={{clientId}}&response_type=code&redirect_uri=http://localhost/myapp/&response_mode=query&scope=openid%20offline_access%20https%3A%2F%2Fgraph.microsoft.com%2Fmail.read&state=12345
response code is 200 and got a bearerToken】