Reputation: 3057
I would like to change the price tier of my azure analysis service via rest API in logic APP. To do this job I have founded this API
In logic APP I have set such a request
{
"uri": "https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers/{serverName}?api-version=2017-08-01",
"method": "PATCH",
"authentication": {
"tenant": "GUID, which I get from Azure AD for AzureAS",
"audience": "https://management.azure.windows.net",
"clientId": "GUID, which I get from AzureAD for AzureAS",
"secret": "*sanitized*",
"type": "ActiveDirectoryOAuth"
},
"body": {
"sku": {
"capacity": 1,
"name": "S4",
"tier": "Standard"
},
"tags": {
"testKey": "testValue"
}
}
}
After sending this request I get this message:
BadRequest. Http request failed as there is an error getting AD OAuth token: 'AADSTS50001: The application named https://management.azure.windows.net was not found in the tenant named xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. 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.
In AzureAD I see the following:
My question is now for this API which API-Permission should I add in AzureAD?
Upvotes: 0
Views: 5863
Reputation: 136346
As mentioned in the comments, the resource (audience) for which the code/token should be acquired is https://management.core.windows.net/
.
Moreover you need to have following delegated permission to execute Azure API: Execute Windows Azure Service Management API.
Once you do that, you should be able to perform the operation.
Upvotes: 2