Skip to content

Commit 11217a9

Browse files
authored
Merge pull request Azure#10402 from bashahee/auditing
Fix a small bug.
2 parents 4719d34 + 0d48f2d commit 11217a9

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/Sql/Sql/Auditing/Services/SqlAuditAdapter.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,13 @@ private void ModelizeStorageInfo(ServerAuditModel model,
134134

135135
if (isAuditEnabled)
136136
{
137+
if (storageAccountSubscriptionId == null || Guid.Empty.Equals(storageAccountSubscriptionId))
138+
{
139+
storageAccountSubscriptionId = Subscription.GetId();
140+
}
141+
137142
model.StorageAccountResourceId = AzureCommunicator.RetrieveStorageAccountIdAsync(
138-
storageAccountSubscriptionId ?? Subscription.GetId(),
143+
(Guid)storageAccountSubscriptionId,
139144
GetStorageAccountName(storageEndpoint)).GetAwaiter().GetResult();
140145
ModelizeRetentionInfo(model, retentionDays);
141146
}

src/Sql/Sql/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
* Remove aliases for deprecated Vulnerability Assessment Settings cmdlets
3131
* Deprecate Advanced Threat Detection Settings cmdlets
3232
* Adding cmdlets to Disable and enable sensitivity recommendations on columns in a database.
33+
* Fix a small bug when reading auditing settings of a server or a database.
3334

3435
## Version 1.15.0
3536
* Add support for setting Active Directory Administrator on Managed Instance

0 commit comments

Comments
 (0)