API pull of Azure Analysis Service Last modified time
I am trying to extract the highlighted value from a Azure Analysis Service.
Looking at the regular API, this value is not available:
{
"id": "/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/TestRG/providers/Microsoft.AnalysisServices/servers/azsdktest",
"location": "West US",
"name": "azsdktest",
"properties": {
"asAdministrators": {
"members": [
"azsdktest@microsoft.com"
]
},
"provisioningState": "Provisioning",
"serverFullName": "asazure://nightly1.asazure-int.windows.net/azsdktest",
"state": "Provisioning"
},
"sku": {
"capacity": 1,
"name": "S1",
"tier": "Standard"
},
"tags": {
"testKey": "testValue"
}
}
I looked in the Developer tools into what requests are made by the Azure Portal, and found this value here:
Request URL: https://asazureeus24-aspaaseastus2.asazure.windows.net/webapi/xmla/direct
Request Method: POST
Payload:
But I am unable to generate a token with the correct permissions using my service principle. Using a regular token generation I get a response but the schema is empty, and using the 2 factor authentication I get Unauthorized error. Using the token from the developer tools it works fine. I am using postman for the requests.
What is the correct way to generate a token? The API only says that the scope is user_impersonation, but there are no examples on how to correctly use it.
Thank you.