File tree Expand file tree Collapse file tree 3 files changed +13
-1
lines changed
Entrypoints/HTTP Functions Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,12 @@ function Add-CIPPDbItem {
4242
4343 try {
4444 $Table = Get-CippTable - tablename ' CippReportingDB'
45+ # Get the existing type entries and nuke them. This ensures we don't have stale data.
46+ $Filter = " PartitionKey eq '{0}' and RowKey ge '{1}-' and RowKey lt '{1}0'" -f $TenantFilter , $Type
47+ $ExistingEntities = Get-CIPPAzDataTableEntity @Table - Filter $Filter
48+ if ($ExistingEntities ) {
49+ Remove-AzDataTableEntity @Table - Entity $ExistingEntities - Force | Out-Null
50+ }
4551
4652 if ($Count ) {
4753 $Entity = @ {
@@ -54,7 +60,7 @@ function Add-CIPPDbItem {
5460
5561 } else {
5662 $Entities = foreach ($Item in $Data ) {
57- $ItemId = $Item.id
63+ $ItemId = $Item.id ? $Item .id : $item .skuId
5864 @ {
5965 PartitionKey = $TenantFilter
6066 RowKey = " $Type -$ItemId "
Original file line number Diff line number Diff line change @@ -121,6 +121,11 @@ function Invoke-ListTests {
121121 $TestResultsData | Add-Member - NotePropertyName ' MFAState' - NotePropertyValue $MFAStateData - Force
122122 }
123123
124+ $LicenseData = New-CIPPDbRequest - TenantFilter $TenantFilter - Type ' LicenseOverview'
125+ if ($LicenseData ) {
126+ $TestResultsData | Add-Member - NotePropertyName ' LicenseData' - NotePropertyValue @ ($LicenseData ) - Force
127+ }
128+
124129 $StatusCode = [HttpStatusCode ]::OK
125130 $Body = $TestResultsData
126131
Original file line number Diff line number Diff line change @@ -55,3 +55,4 @@ function Get-CIPPDbItem {
5555 throw
5656 }
5757}
58+
You can’t perform that action at this time.
0 commit comments