Hi hspinto I am using Hybrid worker configuration and private link to connect to SQL db. All the export runbooks are working fine but the recommend runbooks are not able to generate any data, however the json file is created in the storage account without any data. When i tried to troubleshoot and run it in the test mode, it generates the below error. I tried updating the Az.operationalinsights module to 3.0.0 which is the current module, but no luck.
Logging in to Azure with ManagedIdentity...
Environments
------------
{[AzureChinaCloud, AzureChinaCloud], [AzureCloud, AzureCloud], [AzureGermanCloud, AzureGermanCloud], [AzureUSGovernme...
Finding tables where recommendations will be generated from...
Will run query against tables AzureOptimizationAADObjectsV1_CL
Name : xxxxxx
Account : xxxxxxxxxx
Environment : AzureCloud
Subscription : xxxxxxxxxxxxxx
Tenant : xxxxxxxxxxxxxxxxx
TokenCache :
VersionProfile :
ExtendedProperties : {}Query failed. Debug the following query in the AOE Log Analytics workspace: let expiryInterval = 30d;
let AppsAndKeys = materialize (AzureOptimizationAADObjectsV1_CL
| where TimeGenerated > ago(1d)
| where ObjectType_s in ('Application','ServicePrincipal')
| where ObjectSubType_s != 'ManagedIdentity'
| where Keys_s startswith '['
| extend Keys = parse_json(Keys_s)
| project-away Keys_s
| mv-expand Keys
| evaluate bag_unpack(Keys)
| union (
AzureOptimizationAADObjectsV1_CL
| where TimeGenerated > ago(1d)
| where ObjectType_s in ('Application','ServicePrincipal')
| where ObjectSubType_s != 'ManagedIdentity'
| where isnotempty(Keys_s) and Keys_s !startswith '['
| extend Keys = parse_json(Keys_s)
| project-away Keys_s
| evaluate bag_unpack(Keys)
)
);
let ExpirationInRisk = AppsAndKeys
| where EndDate < now()+expiryInterval
| project ApplicationId_g, KeyId, RiskDate = EndDate;
let NotInRisk = AppsAndKeys
| where EndDate > now()+expiryInterval
| project ApplicationId_g, KeyId, ComfortDate = EndDate;
let ApplicationsInRisk = ExpirationInRisk
| join kind=leftouter ( NotInRisk ) on ApplicationId_g
| where isempty(ComfortDate)
| summarize ExpiresOn = max(RiskDate) by ApplicationId_g;
AppsAndKeys
| join kind=inner (ApplicationsInRisk) on ApplicationId_g
| summarize ExpiresOn = max(EndDate) by ApplicationId_g, ObjectType_s, DisplayName_s, Cloud_s, KeyType, TenantGuid_g
| order by ExpiresOn desc
The term 'Invoke-AzOperationalInsightsQuery' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.