diff --git a/src/HealthcareApis/HealthcareApis/ChangeLog.md b/src/HealthcareApis/HealthcareApis/ChangeLog.md index 9e27a9eb75bb..a9f26a9341a5 100644 --- a/src/HealthcareApis/HealthcareApis/ChangeLog.md +++ b/src/HealthcareApis/HealthcareApis/ChangeLog.md @@ -18,6 +18,7 @@ - Additional information about change #1 --> ## Upcoming Release +* Access policies are no longer defaulted to the current principal ## Version 1.0.1 * Update references in .psd1 to use relative path diff --git a/src/HealthcareApis/HealthcareApis/HealthcareApis/NewAzureRmHealthcareApisService.cs b/src/HealthcareApis/HealthcareApis/HealthcareApis/NewAzureRmHealthcareApisService.cs index f37c5f560f19..114287451567 100644 --- a/src/HealthcareApis/HealthcareApis/HealthcareApis/NewAzureRmHealthcareApisService.cs +++ b/src/HealthcareApis/HealthcareApis/HealthcareApis/NewAzureRmHealthcareApisService.cs @@ -208,17 +208,13 @@ private List GetAccessPolicies() { List accessPolicies = new List(); - if (AccessPolicyObjectId == null || AccessPolicyObjectId.Length == 0) + if (AccessPolicyObjectId != null && AccessPolicyObjectId.Length > 0) { - string objectID = base.AccessPolicyID; - accessPolicies.Add(new ServiceAccessPolicyEntry(objectID)); - return accessPolicies; - } - - foreach (var objectID in AccessPolicyObjectId) - { - HealthcareApisArgumentValidator.ValidateObjectId(objectID); - accessPolicies.Add(new ServiceAccessPolicyEntry(objectID)); + foreach (var objectID in AccessPolicyObjectId) + { + HealthcareApisArgumentValidator.ValidateObjectId(objectID); + accessPolicies.Add(new ServiceAccessPolicyEntry(objectID)); + } } return accessPolicies;