API pull of Azure Analysis Service Last modified time

Lily 1 Reputation point
2023-02-26T15:11:23.17+00:00

I am trying to extract the highlighted value from a Azure Analysis Service.

User's image

Looking at the regular API, this value is not available:

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers/{serverName}?api-version=2017-08-01

{
  "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.

Azure Analysis Services
Azure Analysis Services
An Azure service that provides an enterprise-grade analytics engine.
431 questions
{count} votes