Skip to content

Commit

Permalink
Merge pull request #5597 from NikCharlebois/Fixes-#5523
Browse files Browse the repository at this point in the history
Fix
  • Loading branch information
NikCharlebois authored Dec 28, 2024
2 parents 5327339 + b96199a commit a1f9c43
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
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

0 comments on commit a1f9c43

Please sign in to comment.