Skip to content

Commit

Permalink
Changed AppId+Secret to credential
Browse files Browse the repository at this point in the history
  • Loading branch information
denishol committed May 4, 2023
1 parent 507f583 commit a74c9e2
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1540,12 +1540,11 @@ Configuration M365TenantConfig
AADConditionalAccessPolicy 4bc4e725-9ed1-430b-b275-39bfd7fbc6bd
{
ApplicationEnforcedRestrictionsIsEnabled = $False;
ApplicationId = $ConfigurationData.NonNodeData.ApplicationId;
ApplicationSecret = New-Object System.Management.Automation.PSCredential ('ApplicationSecret', (ConvertTo-SecureString $ConfigurationData.NonNodeData.ApplicationSecret -AsPlainText -Force));
BuiltInControls = @();
ClientAppTypes = @("all");
CloudAppSecurityIsEnabled = $False;
CloudAppSecurityType = "";
Credential = $Credscredential;
CustomAuthenticationFactors = @();
DeviceFilterRule = "";
DisplayName = "CA406-Guests-DataProtection-AllApps-AnyPlatform-SignInSessionPolicy";
Expand Down Expand Up @@ -1573,7 +1572,6 @@ Configuration M365TenantConfig
SignInFrequencyValue = 1;
SignInRiskLevels = @();
State = "disabled";
TenantId = $ConfigurationData.NonNodeData.TenantId;
UserRiskLevels = @();
}
AADConditionalAccessPolicy d1b89341-daa3-4343-ad49-64401bc010b5
Expand Down Expand Up @@ -1614,12 +1612,11 @@ Configuration M365TenantConfig
AADConditionalAccessPolicy 7c384b11-1a13-4461-8c78-7e4ea19e8d46
{
ApplicationEnforcedRestrictionsIsEnabled = $False;
ApplicationId = $ConfigurationData.NonNodeData.ApplicationId;
ApplicationSecret = New-Object System.Management.Automation.PSCredential ('ApplicationSecret', (ConvertTo-SecureString $ConfigurationData.NonNodeData.ApplicationSecret -AsPlainText -Force));
BuiltInControls = @();
ClientAppTypes = @("all");
CloudAppSecurityIsEnabled = $False;
CloudAppSecurityType = "";
Credential = $Credscredential;
CustomAuthenticationFactors = @();
DeviceFilterRule = "";
DisplayName = "CA506-GuestAdmins-DataProtection-AllApps-AnyPlatform-SignInSessionPolicy";
Expand Down Expand Up @@ -1647,7 +1644,6 @@ Configuration M365TenantConfig
SignInFrequencyValue = 1;
SignInRiskLevels = @();
State = "disabled";
TenantId = $ConfigurationData.NonNodeData.TenantId;
UserRiskLevels = @();
}
AADConditionalAccessPolicy 4d030164-13ce-4576-a6b8-8f55e30e7d0d
Expand Down

2 comments on commit a74c9e2

@0x6f677548
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@clajes : can you approve this to main? I just spent a couple of hours trying to understand what was wrong with the script, and his may spare others.. :)
thanks for your work and sharing

@clajes
Copy link
Contributor

@clajes clajes commented on a74c9e2 Aug 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for suggesting the change. It has been a while since I used it and updated it last, - will approve

Please sign in to comment.