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

Fix #5597

Merged
merged 1 commit into from
Dec 28, 2024
Merged

Fix #5597

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
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@

# UNRELEASED

* AADOrganizationCertificateBasedAuthConfiguration
* Fixed the primary key of the resource.
FIXES [#5523](https://github.com/microsoft/Microsoft365DSC/issues/5523)
* DefenderDeviceAuthenticatedScanDefinition
* Fixed the Data Type export.
* MISC
* DEFENDER
* Added support for the UseBasicParsing paramter for REST calls.

# 1.24.1218.1

* AADApplication
* Added support for Oauth2PermissionScopes.
* Fixes comparison issue for permissions.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function Get-TargetResource
[Microsoft.Management.Infrastructure.CimInstance[]]
$CertificateAuthorities,

[Parameter()]
[Parameter(Mandatory = $true)]
[System.String]
$OrganizationId,
#endregion
Expand Down Expand Up @@ -141,7 +141,7 @@ function Set-TargetResource
[Microsoft.Management.Infrastructure.CimInstance[]]
$CertificateAuthorities,

[Parameter()]
[Parameter(Mandatory = $true)]
[System.String]
$OrganizationId,
#endregion
Expand Down Expand Up @@ -225,7 +225,13 @@ function Set-TargetResource
certificateAuthorities = $createCertAuthorities
}

$policy = Invoke-MgGraphRequest -Uri ((Get-MSCloudLoginConnectionProfile -Workload MicrosoftGraph).ResourceUrl + "beta/organization/$OrganizationId/certificateBasedAuthConfiguration/") -Method POST -Body $params
$uri = ((Get-MSCloudLoginConnectionProfile -Workload MicrosoftGraph).ResourceUrl + `
"beta/organization/$OrganizationId/certificateBasedAuthConfiguration/")

Write-Verbose -Message "Creating with Parameters:`r`n$(ConvertTo-Json $params -Depth 10)"
Invoke-MgGraphRequest -Uri $uri `
-Method 'POST' `
-Body $params
}
}

Expand All @@ -240,7 +246,7 @@ function Test-TargetResource
[Microsoft.Management.Infrastructure.CimInstance[]]
$CertificateAuthorities,

[Parameter()]
[Parameter(Mandatory = $true)]
[System.String]
$OrganizationId,
#endregion
Expand Down Expand Up @@ -417,6 +423,10 @@ function Export-TargetResource
}
foreach ($config in $getValue)
{
if ($null -ne $Global:M365DSCExportResourceInstancesCount)
{
$Global:M365DSCExportResourceInstancesCount++
}
$displayedKey = "CertificateBasedAuthConfigurations for $($getValue.DisplayName)"
Write-Host " |---[$i/$($getValue.Count)] $displayedKey" -NoNewline
$params = @{
Expand Down