Skip to content

Commit

Permalink
Merge pull request #1274 from microsoft/Dev
Browse files Browse the repository at this point in the history
Release 1.21.616.1
  • Loading branch information
NikCharlebois authored Jun 16, 2021
2 parents a5a6c57 + 51c6824 commit ec48ec6
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 38 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Change log for Microsoft365DSC

# 1.21.616.1

* SPOSiteAuditSettings
* Fixed issue with Export where property Ensure was added
when an access forbidden error was encountered;
* DEPENDENCIES
* Updated Microsoft.Graph.Authentication to version 1.6.0;
* Updated Microsoft.Graph.Planner to version 1.6.0;
* Updated Microsoft.Graph.Teams to version 1.6.0;

# 1.21.609.2

* Fixed dependency on Microsoft.Graph.Authentication for
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,6 @@ function Get-TargetResource
Add-M365DSCTelemetryEvent -Data $data
#endregion

$nullReturn = $PSBoundParameters
$nullReturn.Ensure = "Absent"

try
{
$auditSettings = Get-PnPAuditing -ErrorAction Stop
Expand Down Expand Up @@ -102,7 +99,7 @@ function Get-TargetResource
{
Write-Verbose -Message $_
}
return $nullReturn
return $null
}
}

Expand Down Expand Up @@ -322,32 +319,54 @@ function Export-TargetResource

$Results = Get-TargetResource @params

if ([System.String]::IsNullOrEmpty($Results.AuditFlags))
if ($null -ne $Results)
{
$Results.AuditFlags = 'None'
if ([System.String]::IsNullOrEmpty($Results.AuditFlags))
{
$Results.AuditFlags = 'None'
}
$Results = Update-M365DSCExportAuthenticationResults -ConnectionMode $ConnectionMode `
-Results $Results
$currentDSCBlock = Get-M365DSCExportContentForResource -ResourceName $ResourceName `
-ConnectionMode $ConnectionMode `
-ModulePath $PSScriptRoot `
-Results $Results `
-GlobalAdminAccount $GlobalAdminAccount

# Make the Url parameterized
if ($currentDSCBlock.ToLower().Contains($currentDSCBlock.ToLower()) -or `
$currentDSCBlock.ToLower().Contains($currentDSCBlock.ToLower()))
{
$currentDSCBlock = $currentDSCBlock -ireplace [regex]::Escape('https://' + $principal + '.sharepoint.com/'), "https://`$(`$OrganizationName.Split('.')[0]).sharepoint.com/"
}
$dscContent += $currentDSCBlock
Save-M365DSCPartialExport -Content $currentDSCBlock `
-FileName $Global:PartialExportFileName

Write-Host $Global:M365DSCEmojiGreenCheckMark
}
$Results = Update-M365DSCExportAuthenticationResults -ConnectionMode $ConnectionMode `
-Results $Results
$currentDSCBlock = Get-M365DSCExportContentForResource -ResourceName $ResourceName `
-ConnectionMode $ConnectionMode `
-ModulePath $PSScriptRoot `
-Results $Results `
-GlobalAdminAccount $GlobalAdminAccount

# Make the Url parameterized
if ($currentDSCBlock.ToLower().Contains($currentDSCBlock.ToLower()) -or `
$currentDSCBlock.ToLower().Contains($currentDSCBlock.ToLower()))
else
{
$currentDSCBlock = $currentDSCBlock -ireplace [regex]::Escape('https://' + $principal + '.sharepoint.com/'), "https://`$(`$OrganizationName.Split('.')[0]).sharepoint.com/"
Write-Host $Global:M365DSCEmojiRedX
}
$dscContent += $currentDSCBlock
Save-M365DSCPartialExport -Content $currentDSCBlock `
-FileName $Global:PartialExportFileName

Write-Host $Global:M365DSCEmojiGreenCheckMark
}
catch
{
Write-Verbose -Message $_
$tenantIdValue = ""
if (-not [System.String]::IsNullOrEmpty($TenantId))
{
$tenantIdValue = $TenantId
}
elseif ($null -ne $GlobalAdminAccount)
{
$tenantIdValue = $GlobalAdminAccount.UserName.Split('@')[1]
}
$message = $_.ToString() + $site.Url
Add-M365DSCEvent -Message $message -EntryType 'Error' `
-EventID 1 -Source $($MyInvocation.MyCommand.Source) `
-TenantId $tenantIdValue
Write-Host $Global:M365DSCEmojiRedX
Write-Verbose "There was an issue retrieving Audit Settings for $Url"
}
$i++
Expand Down Expand Up @@ -382,6 +401,7 @@ function Export-TargetResource
{
Write-Verbose -Message $_
}
Write-Host $Global:M365DSCEmojiRedX
return ""
}
}
Expand Down
27 changes: 12 additions & 15 deletions Modules/Microsoft365DSC/Microsoft365DSC.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
#
# Generated by: Microsoft Corporation
#
# Generated on: 2021-06-11
# Generated on: 2021-06-16

@{

# Script module or binary module file associated with this manifest.
# RootModule = ''

# Version number of this module.
ModuleVersion = '1.21.609.2'
ModuleVersion = '1.21.616.1'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down Expand Up @@ -65,7 +65,7 @@
},
@{
ModuleName = "Microsoft.Graph.Authentication"
RequiredVersion = "1.5.0"
RequiredVersion = "1.6.0"
},
@{
ModuleName = "Microsoft.Graph.Groups.Planner"
Expand All @@ -77,11 +77,11 @@
},
@{
ModuleName = "Microsoft.Graph.Planner"
RequiredVersion = "1.5.0"
RequiredVersion = "1.6.0"
},
@{
ModuleName = "Microsoft.Graph.Teams"
RequiredVersion = "1.5.0"
RequiredVersion = "1.6.0"
},
@{
ModuleName = "Microsoft.PowerApps.Administration.PowerShell"
Expand Down Expand Up @@ -177,16 +177,13 @@
IconUri = 'https://github.com/microsoft/Microsoft365DSC/blob/Dev/Modules/Microsoft365DSC/Dependencies/Images/Logo.png?raw=true'

# ReleaseNotes of this module
ReleaseNotes = "* TeamsUpgradePolicy
* Fixes to how we are retrieving users assigned to the
Global Upgrade Policy.
* DEPENDENCIES
* Updated ExchangeOnlineManagement to version 2.0.5;
* Updated Microsoft.Graph.Planner to version 1.5.0;
* Updated Microsoft.Graph.Teams to version 1.5.0;
* Updated Microsoft.PowerApps.Administration.PowerShell
to version 2.0.126;
* Updated PnP.PowerShell to version 1.6.0;"
ReleaseNotes = "* SPOSiteAuditSettings
* Fixed issue with Export where property Ensure was added
when an access forbidden error was encountered;
* DEPENDENCIES
* Updated Microsoft.Graph.Authentication to version 1.6.0;
* Updated Microsoft.Graph.Planner to version 1.6.0;
* Updated Microsoft.Graph.Teams to version 1.6.0;"

# Flag to indicate whether the module requires explicit user acceptance for install/update
# RequireLicenseAcceptance = $false
Expand Down
1 change: 1 addition & 0 deletions Tests/Integration/M365DSCIntegration.Master.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -789,6 +789,7 @@ Configuration Master
AllowPrivateMeetingScheduling = $True;
AllowSharedNotes = $True;
AllowTranscription = $False;
AllowPSTNUsersToBypassLobby = $true
AllowWhiteboard = $True;
AutoAdmittedUsers = "Everyone";
Description = "Integration Meeting Policy";
Expand Down

0 comments on commit ec48ec6

Please sign in to comment.