Skip to content

Commit

Permalink
Merge pull request #1392 from microsoft/Dev
Browse files Browse the repository at this point in the history
Release 1.21.825.1
  • Loading branch information
NikCharlebois authored Aug 25, 2021
2 parents 66b1ed9 + 4125ee5 commit 2e1aace
Show file tree
Hide file tree
Showing 12 changed files with 238 additions and 329 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Change log for Microsoft365DSC

# 1.21.825.1

* SPOTenantSettings
* Added the DisabledWebpartIds & ConditionalAccessPolicy properties;
* DEPENDENCIES;
* Updated AzureADPreview to version 2.0.2.138;
* Updated Microsoft.PowerApps.Administration.PowerShell to version 2.0.131;
* Updated Microsoft.Teams to version 2.5.0;
* MISC
* Additional display alignment fixes for Export;

# 1.21.804.1

* SCDLPComplianceRule
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ function Export-TargetResource
else
{
Write-Host "`r`n" -NoNewline
}g
}
$i = 1
foreach ($SafeLinksPolicy in $SafeLinksPolicies)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,15 @@ function Export-TargetResource
}
catch
{
Write-Host $Global:M365DSCEmojiRedX
if ($_.Exception -like '*401*')
{
Write-Host "`r`n $($Global:M365DSCEmojiYellowCircle) The current tenant is not registered for Intune."
}
else
{
Write-Host $Global:M365DSCEmojiRedX
}

try
{
Write-Verbose -Message $_
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -673,11 +673,14 @@ function Export-TargetResource
}
catch
{
Write-Host $Global:M365DSCEmojiRedX
if ($_.Exception -like '*401*')
{
Write-Host "`r`n $($Global:M365DSCEmojiYellowCircle) The current tenant is not registered for Intune."
}
else
{
Write-Host $Global:M365DSCEmojiRedX
}
try
{
Write-Verbose -Message $_
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ function Export-TargetResource
$i = 1
$dscContent = ''

if ($orgAssets.Length -gt 0)
if ($orgAssets.Length -eq 0)
{
Write-Host $Global:M365DSCEmojiGreenCheckMark
}
Expand All @@ -462,7 +462,7 @@ function Export-TargetResource
{
foreach ($orgAssetLib in $orgAssets.OrgAssetsLibraries)
{
Write-Host " [$i/$($orgAssets.Length)] $LibraryUrl" -NoNewline
Write-Host " [$i/$($orgAssets.Length)] $($orgAssetLib.libraryurl.DecodedUrl)" -NoNewline
$Params = @{
GlobalAdminAccount = $GlobalAdminAccount
LibraryUrl = "https://$tenantName.sharepoint.com/$($orgAssetLib.libraryurl.DecodedUrl)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ function Export-TargetResource
}
foreach ($script in $siteScripts)
{
Write-Host " [$i/$($siteScripts.Length)] $($script.Title)"
Write-Host " [$i/$($siteScripts.Length)] $($script.Title)" -NoNewline
$params = @{
Identity = $script.Id
Title = $script.Title
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,15 @@ function Get-TargetResource
[System.String]
$MarkNewFilesSensitiveByDefault,

[Parameter()]
[ValidateSet("AllowFullAccess", "AllowLimitedAccess", "BlockAccess")]
[System.String]
$ConditionalAccessPolicy,

[Parameter()]
[System.Guid[]]
$DisabledWebPartIds,

[Parameter()]
[ValidateSet("Present", "Absent")]
[System.String]
Expand Down Expand Up @@ -170,6 +179,8 @@ function Get-TargetResource
FilePickerExternalImageSearchEnabled = $SPOTenantSettings.FilePickerExternalImageSearchEnabled
HideDefaultThemes = $SPOTenantSettings.HideDefaultThemes
MarkNewFilesSensitiveByDefault = $SPOTenantSettings.MarkNewFilesSensitiveByDefault
ConditionalAccessPolicy = $SPOTenantSettings.ConditionalAccessPolicy
DisabledWebPartIds = $SPOTenantSettings.DisabledWebPartIds
GlobalAdminAccount = $GlobalAdminAccount
ApplicationId = $ApplicationId
TenantId = $TenantId
Expand Down Expand Up @@ -293,6 +304,15 @@ function Set-TargetResource
[System.String]
$MarkNewFilesSensitiveByDefault,

[Parameter()]
[ValidateSet("AllowFullAccess","AllowLimitedAccess", "BlockAccess")]
[System.String]
$ConditionalAccessPolicy,

[Parameter()]
[System.Guid[]]
$DisabledWebPartIds,

[Parameter()]
[ValidateSet("Present", "Absent")]
[System.String]
Expand Down Expand Up @@ -448,6 +468,15 @@ function Test-TargetResource
[System.String]
$MarkNewFilesSensitiveByDefault,

[Parameter()]
[ValidateSet("AllowFullAccess", "AllowLimitedAccess", "BlockAccess")]
[System.String]
$ConditionalAccessPolicy,

[Parameter()]
[System.Guid[]]
$DisabledWebPartIds,

[Parameter()]
[ValidateSet("Present", "Absent")]
[System.String]
Expand Down Expand Up @@ -522,7 +551,9 @@ function Test-TargetResource
"ApplyAppEnforcedRestrictionsToAdHocRecipients", `
"FilePickerExternalImageSearchEnabled", `
"HideDefaultThemes", `
"MarkNewFilesSensitiveByDefault"
"MarkNewFilesSensitiveByDefault", `
"ConditionalAccessPolicy", `
"DisabledWebPartIds"
)

Write-Verbose -Message "Test-TargetResource returned $TestResult"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ class MSFT_SPOTenantSettings : OMI_BaseResource
[Write, Description("")] boolean FilePickerExternalImageSearchEnabled;
[Write, Description("Defines if the default themes are visible or hidden")] boolean HideDefaultThemes;
[Write, Description("Allow or block external sharing until at least one Office DLP policy scans the content of the file."), ValueMap{"AllowExternalSharing","BlockExternalSharing"}, Values{"AllowExternalSharing","BlockExternalSharing"}] string MarkNewFilesSensitiveByDefault;
[Write, Description("Allow or Block Conditional Access Policy on the SharePoint Tenant"), ValueMap{"AllowFullAccess", "AllowLimitedAccess", "BlockAccess"}, Values{"AllowFullAccess", "AllowLimitedAccess", "BlockAccess"}] string ConditionalAccessPolicy;
[Write, Description("Provide GUID for the Web Parts that are to be disabled on the Sharepoint Site")] string DisabledWebPartIds;
[Write, Description("Only accepted value is 'Present'."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure;
[Write, Description("Credentials of the SharePoint Global Admin"), EmbeddedInstance("MSFT_Credential")] string GlobalAdminAccount;
[Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId;
Expand Down
Loading

0 comments on commit 2e1aace

Please sign in to comment.