Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reset only necessary authentication context #5565

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
* Fixed the Fabric web request to use basic parsing.
* Fixed an issue where the export does not convert tenant name into
generic $OrganizationName variable correctly.
* Reset only necessary authentication context.
* M365DSCUtil
* Update `Get-M365DSCWorkloadsListFromResourceNames` function for more input types.
FIXES [#5525](https://github.com/microsoft/Microsoft365DSC/issues/5525)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ function Set-TargetResource
Write-Verbose -Message 'Waiting for 20 seconds for new permissions to be effective.'
Start-Sleep 20
Write-Verbose -Message 'Disconnecting from Exchange Online'
Reset-MSCloudLoginConnectionProfileContext
Reset-MSCloudLoginConnectionProfileContext -Workload ExchangeOnline
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ function Get-TargetResource
if ((Get-MSCloudLoginConnectionProfile -Workload SecurityComplianceCenter).Connected -and `
(Get-MSCloudLoginConnectionProfile -Workload ExchangeOnline).Connected)
{
Reset-MSCloudLoginConnectionProfileContext
Reset-MSCloudLoginConnectionProfileContext -Workload ExchangeOnline
}
$ConnectionMode = New-M365DSCConnection -Workload 'ExchangeOnline' `
-InboundParameters $PSBoundParameters
Expand Down
2 changes: 1 addition & 1 deletion Modules/Microsoft365DSC/Modules/M365DSCUtil.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -1437,7 +1437,7 @@ function Export-M365DSCConfiguration
try
{
Disconnect-MgGraph -ErrorAction Stop | Out-Null
Reset-MSCloudLoginConnectionProfileContext
Reset-MSCloudLoginConnectionProfileContext -Workload 'MicrosoftGraph'
}
catch
{
Expand Down