-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Key features: - roleManagement - policies - group license assignment - renaming AccessPackages and AccessPackageAssignmentPolicies Related work items: #144, #661, #725, #778, #852
- Loading branch information
Showing
44 changed files
with
1,897 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
function Invoke-TmfPolicy | ||
{ | ||
<# | ||
.SYNOPSIS | ||
Performs the required actions for a resource type against the connected Tenant. | ||
.DESCRIPTION | ||
This command combines the Invoke commands of all Policy resources. | ||
authenticationFlowsPolicies, authenticationMethodsPolicies, authorizationPolicies | ||
#> | ||
Param ( | ||
[switch] $DoNotRequireTenantConfirm | ||
) | ||
|
||
begin | ||
{ | ||
Test-GraphConnection -Cmdlet $PSCmdlet | ||
$tenant = Get-MgOrganization -Property displayName, Id | ||
$policyResources = @("authenticationFlowsPolicies", "authenticationMethodsPolicies", "authorizationPolicies") | ||
} | ||
process | ||
{ | ||
Write-PSFMessage -Level Host -FunctionName "Invoke-TmfPolicies" -String "TMF.TenantInformation" -StringValues $tenant.displayName, $tenant.Id | ||
if (-Not $DoNotRequireTenantConfirm) { | ||
if ((Read-Host "Is this the correct tenant? [y/n]") -notin @("y","Y")) { | ||
Write-PSFMessage -Level Error -String "TMF.UserCanceled" | ||
throw "Connected to the wrong tenant." | ||
} | ||
} | ||
|
||
foreach ($resourceType in ($script:supportedResources.GetEnumerator() | Where-Object {$_.Value.invokeFunction -and $_.Name -in $policyResources} | Sort-Object {$_.Value.weight})) { | ||
if ($script:desiredConfiguration[$resourceType.Name]) { | ||
Write-PSFMessage -Level Host -FunctionName "Invoke-TmfPolicies" -String "TMF.StartingInvokeForResource" -StringValues $resourceType.Name | ||
& $resourceType.Value["invokeFunction"] -Cmdlet $PSCmdlet | ||
} | ||
} | ||
} | ||
end | ||
{ | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
function Test-TmfPolicy | ||
{ | ||
[CmdletBinding()] | ||
Param () | ||
|
||
begin | ||
{ | ||
Test-GraphConnection -Cmdlet $PSCmdlet | ||
$tenant = Get-MgOrganization -Property displayName, Id | ||
$policyResources = @("authenticationFlowsPolicies", "authenticationMethodsPolicies", "authorizationPolicies") | ||
} | ||
process | ||
{ | ||
Write-PSFMessage -Level Host -FunctionName "Test-TmfPolicy" -String "TMF.TenantInformation" -StringValues $tenant.displayName, $tenant.Id | ||
foreach ($resourceType in ($script:supportedResources.GetEnumerator() | Where-Object {$_.Value.testFunction -and $_.Name -in $policyResources} | Sort-Object {$_.Value.weight})) { | ||
if ($script:desiredConfiguration[$resourceType.Name]) { | ||
Write-PSFMessage -Level Host -FunctionName "Test-TmfPolicy" -String "TMF.StartingTestForResource" -StringValues $resourceType.Name | ||
& $resourceType.Value["testFunction"] -Cmdlet $PSCmdlet | Beautify-TmfTestResult | ||
} | ||
} | ||
} | ||
end | ||
{ | ||
|
||
} | ||
} |
Oops, something went wrong.