Azure/CCOInsights

Bug when fetching all subscriptions

eosho opened this issue · 2 comments

eosho commented

Describe the bug
With the latest v7.0, when refreshing the dashboard there is an error stating duplicate subscription Id

Column 'subscriptionId' in Table 'All Subscriptions' contains a duplicate value 'xxxxxxxxx-769e-45ae-ab43-6da33674bd26' and this is not allowed for columns on the one side of a many-to-one relationship or for columns that are used as the primary key of a table.

My fix was editing the query and removing duplicate subscription Ids.
#"Removed Duplicates" = Table.Distinct(#"Expanded managedByTenants1", {"subscriptionId"})

To Reproduce
A simple refresh of the dashboard (might not be reproduce able by everyone)

Expected behavior
Should pull every subscription Ids and remove duplicates

Hi @eosho

You're right, one subscription can be managed by one or more tenants.

Currently to fix this issue you'll need to remove the steps Expanded managedByTennats and Expanded managedByTennats1 from the applied steps section to obtain unique Subscription IDs.

image

We're not showing this information about the tenant management in the reports but this is something we're planning to use in the future.

This bug will be fixed in the 7.1 version.

Thanks!

The PR with the bug fix is waiting for approval, thanks again for your feedback ;)