user2128702
user2128702

Reputation: 2121

Access Azure cost management API data from Azure Data Factory using managed identity

I have a data factory v2 with managed identity automatically assigned to it (object id + tenant id). I also have a resource accessible through Azure's Cost Management REST API

What I'd like to do is try to create REST linked service and authenticate to the API using the automatically generated managed identity.

So, for that purpose in Azure Portal -> Cost/billing resource -> IAM I have given two roles to my ADF managed identity: Billing Reader and Cost Management Reader.

But when I invoke the linked service configured like this:

enter image description here

And configured in the Copy activity Sink like this:

enter image description here

I get the following error:

enter image description here

I am really confused with this message and I don't really understand it is supposed to mean:

Cost management data is unavailable for subscription xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. The offer MS-AZR-xxxxx is not supported.

Upvotes: 1

Views: 982

Answers (1)

Brad Smith
Brad Smith

Reputation: 1

I think it is your scope. According to Microsoft docs, the Cost Details API doesn't support management groups for either EA or MCA customers. (Cost Details is their new name for the Usage Data API)

It's a short way down this page in a highlighted box: https://learn.microsoft.com/en-us/azure/cost-management-billing/automate/get-small-usage-datasets-on-demand

Upvotes: 0

Related Questions