Skip to content

Commit

Permalink
Merge pull request #4165 from NikCharlebois/AAD-Integration-Tests-fixes
Browse files Browse the repository at this point in the history
Fixes Integration AAD
  • Loading branch information
NikCharlebois authored Jan 15, 2024
2 parents ce45497 + 6ecd515 commit b45142c
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,8 @@ function Set-TargetResource
$currentParameters.Add('OrganizationId', $(Get-MgBetaOrganization).Id)
try
{
Write-Verbose -Message "Calling Update-MGBetaOrganization with parameters:"
Write-Verbose -Message "$(Convert-M365DscHashtableToString -Hashtable $currentParameters)"
Update-MgBetaOrganization @currentParameters
}
catch
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<#
This example is used to test new resources and showcase the usage of new resources being worked on.
It is not meant to use as a production baseline.
#>

Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
$Credscredential
)
Import-DscResource -ModuleName Microsoft365DSC

node localhost
{
AADTokenLifetimePolicy 'CreateTokenLifetimePolicy'
{
DisplayName = "PolicyDisplayName"
Definition = @("{`"TokenLifetimePolicy`":{`"Version`":1,`"AccessTokenLifetime`":`"02:00:00`"}}");
IsOrganizationDefault = $false
Ensure = "Present"
Credential = $Credscredential
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ Configuration Example

node localhost
{
AADTokenLifetimePolicy 'CreateTokenLifetimePolicy'
AADTokenLifetimePolicy 'SetTokenLifetimePolicy'
{
DisplayName = "PolicyDisplayName"
Definition = @('{"TokenIssuancePolicy":{"Version": 1,"SigningAlgorithm": "http://www.w3.org/2000/09/xmldsig#rsa-sha1","TokenResponseSigningPolicy": "TokenOnly","SamlTokenVersion": "2.0"}}')
IsOrganizationDefault = $false
Definition = @("{`"TokenLifetimePolicy`":{`"Version`":1,`"AccessTokenLifetime`":`"02:00:00`"}}");
IsOrganizationDefault = $true # Updated
Ensure = "Present"
Credential = $Credscredential
}
Expand Down

0 comments on commit b45142c

Please sign in to comment.